post_type_supports() - WordPress 函数参考中文文档

返回介绍

post_type_supports()

发布于 2017-09-11 字数3490 浏览 932 评论 0

post_type_supports( string $post_type,  string $feature )

Check a post type’s support for a given feature.


描述


参数

$post_type

(string)
(Required)
The post type being checked.

$feature

(string)
(Required)
The feature being checked.


返回值

(bool) Whether the post type supports the given feature.


源代码

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] ) );
}

更新日志

Version 描述
3.0.0 Introduced.

相关函数

Used By

  • wp-includes/rest-api.php:
    create_initial_rest_routes()
  • wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php:
    WP_REST_Posts_Controller::prepare_links()
  • wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php:
    WP_REST_Posts_Controller::get_item_schema()
  • wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php:
    WP_REST_Posts_Controller::get_collection_params()
  • wp-includes/comment.php:
    get_default_comment_status()
  • wp-admin/includes/class-wp-press-this.php:
    WP_Press_This::html()
  • wp-admin/includes/class-wp-press-this.php:
    WP_Press_This::post_formats_html()
  • wp-admin/includes/image.php:
    wp_generate_attachment_metadata()
  • wp-admin/includes/user.php:
    wp_delete_user()
  • wp-admin/includes/template.php:
    get_inline_data()
  • wp-admin/includes/media.php:
    get_media_item()
  • wp-admin/includes/post.php:
    edit_post()
  • wp-admin/includes/post.php:
    get_default_post_to_edit()
  • wp-admin/includes/meta-boxes.php:
    page_attributes_meta_box()
  • wp-admin/includes/meta-boxes.php:
    post_format_meta_box()
  • wp-admin/includes/class-wp-media-list-table.php:
    WP_Media_List_Table::get_columns()
  • wp-admin/includes/class-wp-posts-list-table.php:
    WP_Posts_List_Table::inline_edit()
  • wp-admin/includes/class-wp-posts-list-table.php:
    WP_Posts_List_Table::get_columns()
  • wp-includes/post-template.php:
    get_post_class()
  • wp-includes/post-template.php:
    get_body_class()
  • wp-includes/media.php:
    wp_enqueue_media()
  • wp-includes/post.php:
    wp_insert_post()
  • wp-includes/revision.php:
    wp_revisions_to_keep()
  • wp-includes/revision.php:
    wp_save_post_revision()
  • wp-includes/post-formats.php:
    get_post_format()
  • wp-includes/class-wp-xmlrpc-server.php:
    wp_xmlrpc_server::wp_getComments()
  • wp-includes/class-wp-editor.php:
    _WP_Editors::editor_settings()
  • wp-includes/media-template.php:
    wp_print_media_templates()
  • Show 23 more used by
    Hide more used by


User Contributed Notes

上一篇:post_type_exists()

下一篇:prepend_attachment()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!