| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
Post API: WP_Post_Type class
| File Size: | 1042 lines (31 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| __construct( $post_type, $args = array() X-Ref |
| Constructor. See the register_post_type() function for accepted arguments for `$args`. Will populate object properties from the provided arguments and assign other default properties based on that information. param: string $post_type Post type key. param: array|string $args Optional. Array or string of arguments for registering a post type. |
| set_props( $args ) X-Ref |
| Sets post type properties. See the register_post_type() function for accepted arguments for `$args`. param: array|string $args Array or string of arguments for registering a post type. |
| add_supports() X-Ref |
| Sets the features support for the post type. |
| add_rewrite_rules() X-Ref |
| Adds the necessary rewrite rules for the post type. |
| register_meta_boxes() X-Ref |
| Registers the post type meta box if a custom callback was specified. |
| add_hooks() X-Ref |
| Adds the future post hook action for the post type. |
| register_taxonomies() X-Ref |
| Registers the taxonomies for the post type. |
| remove_supports() X-Ref |
| Removes the features support for the post type. |
| remove_rewrite_rules() X-Ref |
| Removes any rewrite rules, permastructs, and rules for the post type. |
| unregister_meta_boxes() X-Ref |
| Unregisters the post type meta box if a custom callback was specified. |
| unregister_taxonomies() X-Ref |
| Removes the post type from all taxonomies. |
| remove_hooks() X-Ref |
| Removes the future post hook action for the post type. |
| get_rest_controller() X-Ref |
| Gets the REST API controller for this post type. Will only instantiate the controller class once per request. return: WP_REST_Controller|null The controller instance, or null if the post type |
| get_revisions_rest_controller() X-Ref |
| Gets the REST API revisions controller for this post type. Will only instantiate the controller class once per request. return: WP_REST_Controller|null The controller instance, or null if the post type |
| get_autosave_rest_controller() X-Ref |
| Gets the REST API autosave controller for this post type. Will only instantiate the controller class once per request. return: WP_REST_Controller|null The controller instance, or null if the post type |
| get_default_labels() X-Ref |
| Returns the default labels for post types. return: (string|null)[][] The default labels for post types. |
| reset_default_labels() X-Ref |
| Resets the cache for the default labels. |
| Generated : Thu Oct 30 08:20:06 2025 | Cross-referenced by PHPXref |