WordPress Version: 6.1
/**
* Determines whether the site has a Site Icon.
*
* @since 4.3.0
*
* @param int $blog_id Optional. ID of the blog in question. Default current blog.
* @return bool Whether the site has a site icon or not.
*/
function has_site_icon($blog_id = 0)
{
return (bool) get_site_icon_url(512, '', $blog_id);
}