[wp-trac] [WordPress Trac] #37931: new function post_type_exists()

WordPress Trac noreply at wordpress.org
Sat Sep 3 10:05:38 UTC 2016


#37931: new function post_type_exists()
-------------------------------+-----------------------------
 Reporter:  mifr45             |      Owner:
     Type:  feature request    |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  4.6
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 '''New function post_type_exists()'''
 {{{#!php
 <?php
 function post_type_exists($type){
                 $types = get_post_types();
                 if(in_array($type,$types)){
                         return true;
                 }
                 else{
                         return false;
                 }
         }
 ?>
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37931>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list