[wp-trac] [WordPress Trac] #35810: New function: `is_post_type`

WordPress Trac noreply at wordpress.org
Fri Feb 12 12:50:12 UTC 2016


#35810: New function: `is_post_type`
-------------------------------+------------------------------
 Reporter:  sebastian.pisula   |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by swissspidy):

 Why is `is_post_type( 'abc' )` better than `'abc' === get_post_type()`?

 I don't really see a benefit here. People could even confuse it with
 `is_post_type_archive()`

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35810#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list