Warning: This function has been deprecated. Deprecated in favor of do_favicon() instead.

wp_favicon_request() WordPress Function

wp_favicon_request() is a function used to request a favicon from a website. It is typically used to request a favicon from a website that does not have one.

wp_favicon_request() #

Don’t load all of WordPress when handling a favicon.ico request.


Description

Instead, send the headers for a zero-length favicon and bail.


Top ↑

Source

File: wp-includes/load.php

function wp_favicon_request() {
	if ( '/favicon.ico' === $_SERVER['REQUEST_URI'] ) {
		header( 'Content-Type: image/vnd.microsoft.icon' );
		exit;
	}
}

Top ↑

Changelog

Changelog
VersionDescription
5.4.0Deprecated in favor of do_favicon().
3.0.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.