get_post_type_object


get_post_type_object ( $post_type )

Parameters:
  • (string) $post_type The name of a registered post type.
See:
Returns:
  • (WP_Post_Type|null) WP_Post_Type object if it exists, null otherwise.
Defined at:
Change Log:
  • 4: .

Description

Retrieves a post type object by name.

Related Functions

get_post_status_object, get_post_type_labels, get_post_type, get_post_types, set_post_type

Top Google Results

User discussions

wpseek mobile