post_type_supports( string $post_type, string $feature )
Checks a post type’s support for a given feature.
Parameters
- $post_type
-
(Required) The post type being checked.
- $feature
-
(Required) The feature being checked.
Return
(bool) Whether the post type supports the given feature.
Source
File: wp-includes/post.php
function post_type_supports( $post_type, $feature ) {
global $_wp_post_type_features;
return ( isset( $_wp_post_type_features[$post_type][$feature] ) );
}
Related
Used By
Used By | Description |
---|---|
wp-admin/includes/meta-boxes.php: register_and_do_post_meta_boxes() |
Registers the default post meta boxes, and runs the |
wp-includes/rest-api/search/class-wp-rest-post-search-handler.php: WP_REST_Post_Search_Handler::prepare_item() |
Prepares the search result for a given ID. |
wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php: WP_REST_Users_Controller::get_items_permissions_check() |
Permissions check for getting all users. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::prepare_links() |
Prepares links for the request. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::get_available_actions() |
Gets the link relations available for the post and current user. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::get_item_schema() |
Retrieves the post’s schema, conforming to JSON Schema. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::get_schema_links() |
Retrieves Link Description Objects that should be added to the Schema for the posts collection. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::get_collection_params() |
Retrieves the query params for the posts collection. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::get_items() |
Retrieves a collection of posts. |
wp-includes/media-template.php: wp_print_media_templates() |
Prints the templates used in the media manager. |
wp-includes/comment.php: get_default_comment_status() |
Gets the default comment status for a post type. |
wp-includes/post-formats.php: get_post_format() |
Retrieve the format slug for a post |
wp-includes/class-wp-xmlrpc-server.php: wp_xmlrpc_server::wp_getComments() |
Retrieves comments. |
wp-includes/post-template.php: get_body_class() |
Retrieves an array of the class names for the body element. |
wp-includes/post-template.php: get_post_class() |
Retrieves an array of the class names for the post container element. |
wp-includes/rest-api.php: create_initial_rest_routes() |
Registers default REST API routes. |
wp-includes/post.php: wp_insert_post() |
Inserts or update a post. |
wp-includes/class-wp-editor.php: _WP_Editors::editor_settings() | |
wp-includes/revision.php: wp_revisions_to_keep() |
Determines how many revisions to retain for a given post. |
wp-includes/revision.php: wp_save_post_revision() |
Creates a revision for the current version of a post. |
wp-admin/includes/image.php: wp_generate_attachment_metadata() |
Generates attachment meta data and create image sub-sizes for images. |
wp-admin/includes/class-wp-media-list-table.php: WP_Media_List_Table::get_columns() | |
wp-admin/includes/media.php: get_media_item() |
Retrieves HTML form for modifying the image attachment. |
wp-admin/includes/template.php: get_inline_data() |
Adds hidden fields with the data for use in the inline editor for posts and pages. |
wp-admin/includes/class-wp-posts-list-table.php: WP_Posts_List_Table::get_columns() | |
wp-admin/includes/class-wp-posts-list-table.php: WP_Posts_List_Table::_display_rows() | |
wp-admin/includes/class-wp-posts-list-table.php: WP_Posts_List_Table::inline_edit() |
Outputs the hidden row displayed when inline editing |
wp-admin/includes/meta-boxes.php: page_attributes_meta_box() |
Displays page attributes form fields. |
wp-admin/includes/meta-boxes.php: post_format_meta_box() |
Displays post format form elements. |
wp-admin/includes/user.php: wp_delete_user() |
Remove user and optionally reassign posts and links to another user. |
wp-admin/includes/post.php: edit_post() |
Updates an existing post with values provided in |
wp-admin/includes/post.php: get_default_post_to_edit() |
Returns default post information to use when populating the “Write Post” form. |
Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |