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. git-svn-id: https://develop.svn.wordpress.org/trunk@35205 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0ff0b0e606
commit
acce286d34
@ -215,7 +215,8 @@ class WP {
|
||||
}
|
||||
|
||||
$post_status_obj = get_post_status_object( $page->post_status );
|
||||
if ( ! $post_status_obj->public && ! $post_status_obj->protected && ! $post_status_obj->private ) {
|
||||
if ( ! $post_status_obj->public && ! $post_status_obj->protected
|
||||
&& ! $post_status_obj->private && $post_status_obj->exclude_from_search ) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -403,7 +403,8 @@ function url_to_postid( $url ) {
|
||||
}
|
||||
|
||||
$post_status_obj = get_post_status_object( $page->post_status );
|
||||
if ( ! $post_status_obj->public && ! $post_status_obj->protected && ! $post_status_obj->private ) {
|
||||
if ( ! $post_status_obj->public && ! $post_status_obj->protected
|
||||
&& ! $post_status_obj->private && $post_status_obj->exclude_from_search ) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user