wp_site_icon()
Display site icon meta tags.
Hooks from the function
Return
null
. Ничего (null).
Usage
wp_site_icon();
Examples
#1 Demo
Suppose we set the icon for the site in: Appearance > Customize > Site Identity
, then the following code will work like this:
wp_site_icon(); /* will output: <link rel="icon" href="http://example.com/wp-content/uploads/2015/07/cropped-gorchitca___-32x32.jpg" sizes="32x32" /> <link rel="icon" href="http://example.com/wp-content/uploads/2015/07/cropped-gorchitca___-192x192.jpg" sizes="192x192" /> <link rel="apple-touch-icon-precomposed" href="http://example.com/wp-content/uploads/2015/07/cropped-gorchitca___-180x180.jpg"> <meta name="msapplication-TileImage" content="http://example.com/wp-content/uploads/2015/07/cropped-gorchitca___-270x270.jpg"> */
#2 Disable the output of the site icon, if it is installed
To do this, we need write following code in the themes functions.php file:
remove_action( 'wp_head', 'wp_site_icon', 99 );
Changelog
Since 4.3.0 | Introduced. |