From f932c774061dc706c62f110132a8eb2484d86e7d Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 10 Feb 2010 20:37:18 +0000 Subject: [PATCH] Retore p_status. see #9674 git-svn-id: https://develop.svn.wordpress.org/trunk@13049 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/post.php | 2 +- wp-includes/query.php | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 536c55ee69..624b8bdd76 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -711,7 +711,7 @@ function get_post_types( $args = array(), $output = 'names' ) { * Optional $args contents: * * label - A descriptive name for the post type marked for translation. Defaults to $post_type. - * description - A short descriptive summary of what the post type is. Defaults to blank. + * description - A short descriptive summary of what the post type is. Defaults to blank. * public - Whether posts of this type should be shown in the admin UI. Defaults to false. * exclude_from_search - Whether to exclude posts with this post type from search results. Defaults to true if the type is not public, false if the type is public. * publicly_queryable - Whether post_type queries can be performed from the front page. Defaults to whatever public is set as. diff --git a/wp-includes/query.php b/wp-includes/query.php index f0ca462bf6..c3417df308 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2102,8 +2102,12 @@ class WP_Query { $r_status[] = "$wpdb->posts.post_status <> 'trash'"; } else { foreach ( get_post_stati() as $status ) { - if ( in_array( $status, $q_status ) ) - $r_status[] = "$wpdb->posts.post_status = '$status'"; + if ( in_array( $status, $q_status ) ) { + if ( 'private' == $status ) + $p_status[] = "$wpdb->posts.post_status = '$status'"; + else + $r_status[] = "$wpdb->posts.post_status = '$status'"; + } } }