Make WordPress Core


Ignore:
Timestamp:
10/15/2015 05:52:36 PM (10 years ago)
Author:
SergeyBiryukov
Message:

In WP::parse_request() and url_to_postid(), don't skip objects that have a post status with 'exclude_from_search' => false, e.g. inherit.

This fixes pretty permalinks for attachments, broken in [35195].

Fixes #21970.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp.php

    r35195 r35205  
    216216
    217217                            $post_status_obj = get_post_status_object( $page->post_status );
    218                             if ( ! $post_status_obj->public && ! $post_status_obj->protected && ! $post_status_obj->private ) {
     218                            if ( ! $post_status_obj->public && ! $post_status_obj->protected
     219                                && ! $post_status_obj->private && $post_status_obj->exclude_from_search ) {
    219220                                continue;
    220221                            }
Note: See TracChangeset for help on using the changeset viewer.