Echo head favicon if no icon was added via the customizer.
beans_favicon( )
Return: (void)
Source
function beans_favicon() {
// Stop here if and icon was added via the customizer.
if ( function_exists( 'has_site_icon' ) && has_site_icon() ) {
return;
}
$url = file_exists( get_stylesheet_directory() . '/favicon.ico' ) ? get_stylesheet_directory_uri() . '/favicon.ico' : BEANS_URL . 'favicon.ico';
beans_selfclose_markup_e( 'beans_favicon', 'link', array(
'rel' => 'Shortcut Icon',
'href' => $url, // Automatically escaped.
'type' => 'image/x-icon',
) );
}