Ticket #47398: wp-favicon-request.diff
File wp-favicon-request.diff, 1.1 KB (added by , 5 years ago) |
---|
-
wp-includes/load.php
157 157 } 158 158 159 159 /** 160 * Don't load all of WordPress when handling a favicon.ico request.161 *162 * Instead, send the headers for a zero-length favicon and bail.163 *164 * @since 3.0.0165 */166 function wp_favicon_request() {167 if ( '/favicon.ico' == $_SERVER['REQUEST_URI'] ) {168 header( 'Content-Type: image/vnd.microsoft.icon' );169 exit;170 }171 }172 173 /**174 160 * Die with a maintenance message when conditions are met. 175 161 * 176 162 * Checks for a file in the WordPress root directory named ".maintenance". -
wp-settings.php
67 67 // Standardize $_SERVER variables across setups. 68 68 wp_fix_server_vars(); 69 69 70 // Check if we have received a request due to missing favicon.ico71 wp_favicon_request();72 73 70 // Check if we're in maintenance mode. 74 71 wp_maintenance(); 75 72