wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



post_type_exists › WordPress Function

Da3.0.0
Deprecaton/a
post_type_exists ( $post_type )
Parametri:
  • (string) $post_type Post type name.
    Richiesto:
Vedi:
Ritorna:
  • (bool) Whether post type is registered.
Definito a:
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.


Sorgenti

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