Opened 10 years ago
Closed 10 years ago
#37931 closed feature request (invalid)
new function post_type_exists()
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 4.6 |
| Component: | Posts, Post Types | Keywords: | |
| Focuses: | Cc: |
Description
New function post_type_exists()
<?php function post_type_exists($type){ $types = get_post_types(); if(in_array($type,$types)){ return true; } else{ return false; } } ?>
Change History (1)
Note: See
TracTickets for help on using
tickets.
Hey there,
Thanks for your report and welcome to WordPress Trac!
The function
post_type_exists()exists in WordPress since version 3.0.0.