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/rewrite-functions.php

    r35195 r35205  
    404404
    405405                $post_status_obj = get_post_status_object( $page->post_status );
    406                 if ( ! $post_status_obj->public && ! $post_status_obj->protected && ! $post_status_obj->private ) {
     406                if ( ! $post_status_obj->public && ! $post_status_obj->protected
     407                    && ! $post_status_obj->private && $post_status_obj->exclude_from_search ) {
    407408                    continue;
    408409                }
Note: See TracChangeset for help on using the changeset viewer.