mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-01 21:21:24 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@35205 git-svn-id: http://core.svn.wordpress.org/trunk@35171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
395258bcaa
commit
2d540d0280
@ -215,7 +215,8 @@ class WP {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$post_status_obj = get_post_status_object( $page->post_status );
|
$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;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -403,7 +403,8 @@ function url_to_postid( $url ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$post_status_obj = get_post_status_object( $page->post_status );
|
$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;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-alpha-35204';
|
$wp_version = '4.4-alpha-35205';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user