Ticket #10930: 10930.diff
File 10930.diff, 1.1 KB (added by , 15 years ago) |
---|
-
wp-includes/classes.php
450 450 * Set the Headers for 404, if permalink is not found. 451 451 * 452 452 * Issue a 404 if a permalink request doesn't match any posts. Don't issue 453 * a 404 if one was already issued, if the request was a search, or if the 454 * request was a regular query string request rather than a permalink 455 * request. Issues a 200, if not 404. 453 * a 404 if one was already issued or if the request was a search. 454 * Issues a 200, if not 404. 456 455 * 457 456 * @since 2.0.0 458 457 */ 459 458 function handle_404() { 460 459 global $wp_query; 461 460 462 if ( (0 == count($wp_query->posts)) && !is_404() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?')))) ) {461 if ( 0 == count($wp_query->posts) && !is_404() && !is_search() ) { 463 462 // Don't 404 for these queries if they matched an object. 464 463 if ( ( is_tag() || is_category() || is_author() ) && $wp_query->get_queried_object() ) { 465 464 if ( !is_404() )