wp_favicon_request

函数


wp_favicon_request ( No parameters )
定义位置
  • wp-includes/load.php
    , line 250
引入
3.0.0
弃用
5.4.0

Don’t load all of WordPress 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;
	}
}