wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



post_type_exists › WordPress Function

Desde3.0.0
Obsoleton/a
post_type_exists ( $post_type )
Parâmetros:
  • (string) $post_type Post type name.
    Required: Yes
Ver:
Retorna:
  • (bool) Whether post type is registered.
Definido em:
Codex:

Determines whether a post type is registered.

For more information on this and similar theme functions, check out the {@link Conditional Tags} article in the Theme Developer Handbook.


Fonte

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