is_post_type_hierarchical( string $post_type_key );
This construct (function) checks if the given post type is hierarchical. This argument is set when the post type is first configured and registered with WordPress Core.
- The post type’s key (slug) to specify which post type is being checked.
If the post type exists, then it returns the value of
hierarchical, which is a boolean. Else,
false is returned.
Your functions are bloated. Put them on a diet. Think "skinny" and "as few lines as possible."
More coming soon…keep checking back.