post_type_exists( string $post_type_key );
This construct (function) checks if the given post type has been registered with WordPress Core. It checks in the global variable
$wp_post_types, which is an array of registered post types.
- The key or slug of the post type to be checked within the global variable
true if the post type is registered. Else,
false is returned.
If you listen carefully, you can hear the 1s and 0s flowing in your computer.
More coming soon…keep checking back.