[wp-trac] [WordPress Trac] #18993: is_post_type_archive() returns true in the admin area
WordPress Trac
wp-trac at lists.automattic.com
Wed Oct 19 01:05:50 UTC 2011
#18993: is_post_type_archive() returns true in the admin area
----------------------------+------------------------------
Reporter: johnbillion | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 3.3
Severity: normal | Resolution:
Keywords: needs-patch |
----------------------------+------------------------------
Comment (by dd32):
The admin is really just another loop.
For this reason, a lot of loop modifying functions I see have a `if (
is_admin() || !is_main_query() ) return $input;` short circuit. This is
expected behaviour I believe.. `is_post_type_archive()` doesn't really
feel like a function you'd expect to use outside of a template loop, but
it's naming is just for the most obvious use-case..
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18993#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list