Opened 13 years ago
Closed 13 years ago
#20049 closed defect (bug) (fixed)
WP_Query should use WP_Query::is_admin, not is_admin(), to add protected statuses
Reported by: | nacin | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Query | Keywords: | |
Focuses: | Cc: |
Description
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.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Looks good.