is_post_type_hierarchical() – Whether the post type is hierarchical.

You appear to be a bot. Output may be restricted

Description

Determines whether the post type is hierarchical.

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

Usage

$bool = is_post_type_hierarchical( $post_type );

Parameters

$post_type
( string ) required – Post type name

Returns

bool Whether post type is hierarchical.

Source

File name: wordpress/wp-includes/post.php
Lines:

1 to 8 of 8
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;
}
 

 View on GitHub View on Trac