has_site_icon() WordPress Function
The has_site_icon() function is used to check if a site icon has been set for the current site. If a site icon has been set, the function will return true. Otherwise, it will return false.
has_site_icon( int $blog_id ) #
Whether the site has a Site Icon.
Parameters
- $blog_id
(int)(Optional) ID of the blog in question. Default current blog.
Return
(bool) Whether the site has a site icon or not.
Source
File: wp-includes/general-template.php
function has_site_icon( $blog_id = 0 ) { return (bool) get_site_icon_url( 512, '', $blog_id ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.3.0 | Introduced. |