[wp-trac] [WordPress Trac] #12588: Add function to check if current page is a custom post type

WordPress Trac wp-trac at lists.automattic.com
Mon May 24 00:43:18 UTC 2010


#12588: Add function to check if current page is a custom post type
-------------------------------------+--------------------------------------
 Reporter:  sirzooro                 |        Owner:  nacin   
     Type:  enhancement              |       Status:  reopened
 Priority:  normal                   |    Milestone:  3.0     
Component:  Administration           |      Version:  3.0     
 Severity:  normal                   |   Resolution:          
 Keywords:  has-patch needs-testing  |  
-------------------------------------+--------------------------------------

Comment(by scribu):

 Having is_post_type() and is_taxonomy() is confusing, since the is_*()
 functions are expected to be conditional tags. I think we should rename
 (deprecate) them:

 is_taxonomy() -> taxonomy_exists()

 is_taxonomy_hierarchical() -> hierarchical_taxonomy_exists()

 is_post_type() -> post_type_exists()

 is_hierarchical_post_type() -> hierarchical_post_type_exists()

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


More information about the wp-trac mailing list