wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



is_post_type_hierarchical › WordPress Function

Depuis3.0.0
Dépréciéen/a
is_post_type_hierarchical ( $post_type )
Paramètres:
  • (string) $post_type Post type name
    Requis: Oui
Voir:
Retourne:
  • (bool) Whether post type is hierarchical.
Défini(e) dans:
Codex:

Determines whether the post type is hierarchical.

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


Source

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;
}