diff --git a/wp-includes/class-wp.php b/wp-includes/class-wp.php index 4acadadca1..4a3b42c795 100644 --- a/wp-includes/class-wp.php +++ b/wp-includes/class-wp.php @@ -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; } } diff --git a/wp-includes/rewrite-functions.php b/wp-includes/rewrite-functions.php index 2f9be5ad99..829df3d1a5 100644 --- a/wp-includes/rewrite-functions.php +++ b/wp-includes/rewrite-functions.php @@ -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; } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 205dc16c0a..e8926c27c1 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @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.