do_favicon() WordPress Function

The do_favicon() function is used to display a favicon on a WordPress site. A favicon is a small icon that represents a website or a specific page on a website. The favicon is usually displayed in the browser's address bar, in the browser's tab bar, and in bookmark lists.

do_favicon() #

Display the favicon.ico file content.


Source

File: wp-includes/functions.php

function do_favicon() {
	/**
	 * Fires when serving the favicon.ico file.
	 *
	 * @since 5.4.0
	 */
	do_action( 'do_faviconico' );

	wp_redirect( get_site_icon_url( 32, includes_url( 'images/w-logo-blue-white-bg.png' ) ) );
	exit;
}


Top ↑

Changelog

Changelog
VersionDescription
5.4.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