wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_favicon_request › WordPress Function

Since3.0.0
Deprecated5.4.0
wp_favicon_request ( No parameters )
Defined at:
Codex:

Ensures all of WordPress is not loaded when handling a favicon.ico request.

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


Source

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