[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
Sat May 8 20:54:27 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       |  
----------------------------+-----------------------------------------------
Changes (by scribu):

  * type:  defect (bug) => enhancement


Comment:

 I think I understand what you're getting at:

 Rather than checking if a post type is registered, you want is_post_type()
 to act like a conditional tag.

 IMO, we should add a $post_type parameter to is_singular() instead.

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


More information about the wp-trac mailing list