[wp-trac] [WordPress Trac] #20049: WP_Query should use WP_Query::is_admin, not is_admin(), to add protected statuses
WordPress Trac
wp-trac at lists.automattic.com
Wed Feb 15 14:53:41 UTC 2012
#20049: WP_Query should use WP_Query::is_admin, not is_admin(), to add protected
statuses
--------------------------+-----------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.4
Component: Query | Version:
Severity: normal | Keywords:
--------------------------+-----------------
WP_Query sets up an WP_Query::is_admin flag based on is_admin() in
WP_Query::parse_query(). But it never uses it. When it goes to add
protected post statuses, it checks is_admin() again.
To allow this to be easily filtered from the parse_query hook (something I
plan to submit to the Debug Bar Console, as it uses admin-ajax which
thinks it is is_admin), we should be using the query flag, not the
function.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20049>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list