Retore p_status. see #9674
git-svn-id: https://develop.svn.wordpress.org/trunk@13049 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5c5ceba9bf
commit
f932c77406
@ -2102,10 +2102,14 @@ class WP_Query {
|
|||||||
$r_status[] = "$wpdb->posts.post_status <> 'trash'";
|
$r_status[] = "$wpdb->posts.post_status <> 'trash'";
|
||||||
} else {
|
} else {
|
||||||
foreach ( get_post_stati() as $status ) {
|
foreach ( get_post_stati() as $status ) {
|
||||||
if ( in_array( $status, $q_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'";
|
$r_status[] = "$wpdb->posts.post_status = '$status'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( empty($q['perm'] ) || 'readable' != $q['perm'] ) {
|
if ( empty($q['perm'] ) || 'readable' != $q['perm'] ) {
|
||||||
$r_status = array_merge($r_status, $p_status);
|
$r_status = array_merge($r_status, $p_status);
|
||||||
|
Loading…
Reference in New Issue
Block a user