获取所有帖子类型功能
原型
get_all_post_type_supports( string $post_type )
参数
$post_type
(string)
(Required)
帖子类型。
返回值
(array)
帖子类型支持列表。
源文件
路径:wp-includes/post.php
<?php
...
function get_all_post_type_supports( $post_type ) {
global $_wp_post_type_features;
if ( isset( $_wp_post_type_features[$post_type] ) )
return $_wp_post_type_features[$post_type];
return array();
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/get_all_post_type_supports/