Uses
Uses | Description |
---|---|
wp-includes/post.php: get_post_type_object() | Retrieves a post type object by name. |
Determines whether a post type is registered.
For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.
(string) (Required) Post type name.
(bool) Whether post type is registered.
File: wp-includes/post.php
function post_type_exists( $post_type ) { return (bool) get_post_type_object( $post_type ); }
Version | Description |
---|---|
3.0.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/post_type_exists