WordPress开发者和主题制作者的搜索引擎



post_type_supports ›

Since3.0.0
已弃用n/a
post_type_supports ( $post_type, $feature )
参数: (2)
  • (string) $post_type The post type being checked.
    Required: Yes
  • (string) $feature The feature being checked.
    Required: Yes
返回:
  • (bool) Whether the post type supports the given feature.
定义在:
文档:

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



源码

function post_type_supports( $post_type, $feature ) {
	global $_wp_post_type_features;

	return ( isset( $_wp_post_type_features[ $post_type ][ $feature ] ) );
}