Use is_admin WP_Query propery, not is_admin(), when adding protected post statuses to the query. Allows for overriding on the parse_query hook. fixes #20049.
git-svn-id: https://develop.svn.wordpress.org/trunk@19932 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3189f43063
commit
e413239e0a
|
@ -2476,7 +2476,7 @@ class WP_Query {
|
||||||
$where .= " OR $wpdb->posts.post_status = '$state'";
|
$where .= " OR $wpdb->posts.post_status = '$state'";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( is_admin() ) {
|
if ( $this->is_admin ) {
|
||||||
// Add protected states that should show in the admin all list.
|
// Add protected states that should show in the admin all list.
|
||||||
$admin_all_states = get_post_stati( array('protected' => true, 'show_in_admin_all_list' => true) );
|
$admin_all_states = get_post_stati( array('protected' => true, 'show_in_admin_all_list' => true) );
|
||||||
foreach ( (array) $admin_all_states as $state )
|
foreach ( (array) $admin_all_states as $state )
|
||||||
|
|
Loading…
Reference in New Issue