post_type_supports()

最后更新于:2021-11-27 19:47:34

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.

源文件

文件: gc-includes/post.php

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

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