wp_favicon_request()
Deprecated from version 5.4.0 Deprecated in favor of do_favicon().. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.
Ensures all of WordPress is not loaded when handling a favicon.ico request.
Instead, send the headers for a zero-length favicon and bail.
No Hooks.
Return
null
. Nothing (null).
Usage
wp_favicon_request();
Changelog
Since 3.0.0 | Introduced. |
Deprecated since 5.4.0 | Deprecated in favor of do_favicon(). |
wp_favicon_request() wp favicon request code WP 6.5.2
function wp_favicon_request() { if ( '/favicon.ico' === $_SERVER['REQUEST_URI'] ) { header( 'Content-Type: image/vnd.microsoft.icon' ); exit; } }