Opened 15 years ago
Closed 15 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 |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.4 |
| Component: | Query | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Looks good.