post_type_exists( string $post_type )

Check if a post type is registered.


Description

See also


Parameters

$post_type

(Required) Post type name.


Return

(bool) Whether post type is registered.


Source

File: wp-includes/post.php

function post_type_exists( $post_type ) {
	return (bool) get_post_type_object( $post_type );
}


Changelog

Changelog
Version Description
WP-3.0.0 Introduced.