post_type_supports( string $post_type, string $feature )
Check 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-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() |
Get 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() |
Retrieve 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/media.php: wp_enqueue_media() |
Enqueues all scripts, styles, settings, and templates necessary to use all media JS APIs. |
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() |
Retrieve comments. |
wp-includes/post-template.php: get_post_class() |
Retrieves the classes for the post div as an array. |
wp-includes/post-template.php: get_body_class() |
Retrieve the classes for the body element as an array. |
wp-includes/rest-api.php: create_initial_rest_routes() |
Registers default REST API routes. |
wp-includes/post.php: wp_insert_post() |
Insert or update a post. |
wp-includes/class-wp-editor.php: _WP_Editors::editor_settings() | |
wp-includes/revision.php: wp_revisions_to_keep() |
Determine 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() |
Generate post thumbnail attachment meta data. |
wp-admin/includes/class-wp-media-list-table.php: WP_Media_List_Table::get_columns() | |
wp-admin/includes/media.php: get_media_item() |
Retrieve 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::inline_edit() |
Outputs the hidden row displayed when inline editing |
wp-admin/includes/meta-boxes.php: page_attributes_meta_box() |
Display page attributes form fields. |
wp-admin/includes/meta-boxes.php: post_format_meta_box() |
Display 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() |
Update an existing post with values provided in $_POST. |
wp-admin/includes/post.php: get_default_post_to_edit() |
Default post information to use when populating the “Write Post” form. |
Changelog
Version | Description |
---|---|
WP-3.0.0 | Introduced. |