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.


Top ↑

Return

(bool) Whether the site has a site icon or not.


Top ↑

Source

File: wp-includes/general-template.php

function has_site_icon( $blog_id = 0 ) {
	return (bool) get_site_icon_url( 512, '', $blog_id );
}


Top ↑

Changelog

Changelog
VersionDescription
4.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More