WordPress.org

Make WordPress Core

Ticket #3426: 3426.5.diff

File 3426.5.diff, 1.3 KB (added by sivel, 11 years ago)

refresh of 3426-4.diff to work with changes from #11881

  • wp-includes/load.php

     
    105105}
    106106
    107107/**
     108 * Check if a favicon.ico request made it to us, if it did return
     109 * headers for 0 length image/vnd.microsoft.icon
     110 *
     111 * If the request for a favicon.ico made it this far lets toss out a 0 length
     112 * header to short circuit the request from returning a 404.
     113 *
     114 * @since 3.0
     115 */
     116function wp_favicon() {
     117        if ( '/favicon.ico' == $_SERVER['REQUEST_URI'] ) {
     118                header('Content-Type: image/vnd.microsoft.icon');
     119                header('Content-Length: 0');
     120                exit;
     121        }
     122}
     123
     124/**
    108125 * Dies with a maintenance message when conditions are met.
    109126 *
    110127 * Checks for a file in the WordPress root directory named ".maintenance".
     
    544561        return false;
    545562}
    546563
    547 ?>
    548  No newline at end of file
     564?>
  • wp-settings.php

     
    4343// Check for the required PHP version and for the MySQL extension or a database drop-in.
    4444wp_check_php_mysql_versions();
    4545
     46// Check if we have recieved a request due to missing favicon.ico
     47wp_favicon();
     48
    4649// Check if we're in maintenance mode.
    4750wp_maintenance();
    4851