Un motore di ricerca WordPress per sviluppatori e autori di temi



is_post_type_hierarchical ›

Da3.0.0
Deprecaton/a
is_post_type_hierarchical ( $post_type )
Parametri:
  • (string) $post_type Post type name
    Richiesto:
Vedi:
Ritorna:
  • (bool) Whether post type is hierarchical.
Definito a:
Codex:

Whether the post type is hierarchical.

A false return value might also mean that the post type does not exist.



Sorgenti

function is_post_type_hierarchical( $post_type ) {
	if ( ! post_type_exists( $post_type ) ) {
		return false;
	}

	$post_type = get_post_type_object( $post_type );
	return $post_type->hierarchical;
}