Ticket #12250: 12250.001.diff
| File 12250.001.diff, 1.0 KB (added by markjaquith, 3 years ago) |
|---|
-
wp-includes/classes.php
473 473 function handle_404() { 474 474 global $wp_query; 475 475 476 if ( (0 == count($wp_query->posts)) && !is_404() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) { 476 // if ( (0 == count($wp_query->posts)) && !is_404() && !is_search() && ( $this->did_permalink || (!empty($_SERVER['QUERY_STRING']) && (false === strpos($_SERVER['REQUEST_URI'], '?'))) ) ) { 477 if ( (0 == count($wp_query->posts)) && !is_404() && !is_search() && !is_home() ) { 477 478 // Don't 404 for these queries if they matched an object. 478 if ( ( is_tag() || is_category() || is_ author() ) && $wp_query->get_queried_object() ) {479 if ( ( is_tag() || is_category() || is_tax() || is_author() ) && $wp_query->get_queried_object() ) { 479 480 if ( !is_404() ) 480 481 status_header( 200 ); 481 482 return;
