All features
Cherry Blossom feature
Content types Post Types: Post Type
Represents a WordPress post type definition.
Represents a WordPress post type definition.
Capabilities and extension points
Gets the immutable post type definition family.
- return string Definition family.
Registers required post type hooks.
Registers the post type with WordPress.
- return \WP_Post_Type|\WP_Error Registered post type or error.
Gets arguments passed to register_post_type().
- return array Post type registration arguments.
Gets default post type arguments.
- return array Default registration arguments.
Gets the complete post type label set.
- return array Post type labels.
Gets taxonomy associations.
Numeric entries identify existing taxonomies. Associative entries are nested taxonomy definitions normalized by the taxonomy controller.
- return array Taxonomy associations.
Gets associated taxonomy names.
- return array Taxonomy identifiers.
Gets structured data provider classes linked to this post type.
Linked classes should extend the structured data Post_Type_Provider base.
- return array Provider class names.
Validates the post type definition.
- return true|\WP_Error True when valid, otherwise an error.
Source reference
This editable reference page is based on the PHP documentation in content-types/post-types/class-post-type.php.