wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_favicon_request › WordPress Function

Since3.0.0
已弃用5.4.0
wp_favicon_request ( 没有参数 )
定义在:
文档:

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

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


源码

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