From 72791ea9306a526d5f7fe8f580d30a9d18036e00 Mon Sep 17 00:00:00 2001 From: nacin Date: Wed, 15 Feb 2012 19:58:10 +0000 Subject: [PATCH] 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: http://svn.automattic.com/wordpress/trunk@19932 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index e5b3ee498..4174246e8 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2476,7 +2476,7 @@ class WP_Query { $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. $admin_all_states = get_post_stati( array('protected' => true, 'show_in_admin_all_list' => true) ); foreach ( (array) $admin_all_states as $state )