WordPress.org

Make WordPress Core

Ticket #20601: 20601.3.diff

File 20601.3.diff, 879 bytes (added by SergeyBiryukov, 5 years ago)
  • src/wp-includes/class-wp.php

     
    568568                // We will 404 for paged queries, as no posts were found.
    569569                if ( ! is_paged() ) {
    570570
     571                        // Don't 404 for authors without posts as long as they matched an author on this site.
     572                        if ( is_author() && is_user_member_of_blog( get_query_var( 'author' ) ) ) {
     573                                status_header( 200 );
     574                                return;
     575                        }
     576
    571577                        // Don't 404 for these queries if they matched an object.
    572                         if ( ( is_tag() || is_category() || is_tax() || is_author() || is_post_type_archive() ) && $wp_query->get_queried_object() ) {
     578                        if ( ( is_tag() || is_category() || is_tax() || is_post_type_archive() ) && get_queried_object() ) {
    573579                                status_header( 200 );
    574580                                return;
    575581                        }