[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:49:21 UTC 2011


#18993: is_post_type_archive() returns true in the admin area
----------------------------+----------------------
 Reporter:  johnbillion     |       Owner:
     Type:  defect (bug)    |      Status:  closed
 Priority:  normal          |   Milestone:
Component:  Administration  |     Version:  3.3
 Severity:  normal          |  Resolution:  invalid
 Keywords:                  |
----------------------------+----------------------
Changes (by scribu):

 * keywords:  needs-patch =>
 * status:  new => closed
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 This is consistent with all the rest of the conditional tags, which aren't
 expected to be used in the admin area.

 The correct approach here is either what dd32 mentioned, or using
 is_admin() before even calling add_action or add_filter().

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18993#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list