wp_favicon_request

The timeline below displays how wordpress function wp_favicon_request has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.3

/**
 * Ensures all of WordPress is not loaded when handling a favicon.ico request.
 *
 * Instead, send the headers for a zero-length favicon and bail.
 *
 * @since 3.0.0
 * @deprecated 5.4.0 Deprecated in favor of do_favicon().
 */
function wp_favicon_request()
{
    if ('/favicon.ico' === $_SERVER['REQUEST_URI']) {
        header('Content-Type: image/vnd.microsoft.icon');
        exit;
    }
}

WordPress Version: 5.5

/**
 * Don't load all of WordPress when handling a favicon.ico request.
 *
 * Instead, send the headers for a zero-length favicon and bail.
 *
 * @since 3.0.0
 * @deprecated 5.4.0 Deprecated in favor of do_favicon().
 */
function wp_favicon_request()
{
    if ('/favicon.ico' === $_SERVER['REQUEST_URI']) {
        header('Content-Type: image/vnd.microsoft.icon');
        exit;
    }
}

WordPress Version: 5.4

/**
 * Don't load all of WordPress when handling a favicon.ico request.
 *
 * Instead, send the headers for a zero-length favicon and bail.
 *
 * @since 3.0.0
 * @deprecated 5.4.0 Deprecated in favor of do_favicon().
 */
function wp_favicon_request()
{
    if ('/favicon.ico' == $_SERVER['REQUEST_URI']) {
        header('Content-Type: image/vnd.microsoft.icon');
        exit;
    }
}

WordPress Version: 4.4

/**
 * Don't load all of WordPress when handling a favicon.ico request.
 *
 * Instead, send the headers for a zero-length favicon and bail.
 *
 * @since 3.0.0
 */
function wp_favicon_request()
{
    if ('/favicon.ico' == $_SERVER['REQUEST_URI']) {
        header('Content-Type: image/vnd.microsoft.icon');
        exit;
    }
}

WordPress Version: 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.
 *
 * @since 3.0.0
 */
function wp_favicon_request()
{
    if ('/favicon.ico' == $_SERVER['REQUEST_URI']) {
        header('Content-Type: image/vnd.microsoft.icon');
        header('Content-Length: 0');
        exit;
    }
}

WordPress Version: 3.7

/**
 * Don't load all of WordPress when handling a favicon.ico request.
 * Instead, send the headers for a zero-length favicon and bail.
 *
 * @since 3.0.0
 */
function wp_favicon_request()
{
    if ('/favicon.ico' == $_SERVER['REQUEST_URI']) {
        header('Content-Type: image/vnd.microsoft.icon');
        header('Content-Length: 0');
        exit;
    }
}