函数原型
get_all_post_type_supports( string $post_type ): array
函数描述
Gets all the post type features
是否弃用
未弃用
函数参数
-
$post_type
string
Required - The post type.
函数返回值
array Post type supports list.
函数位置
File: wp-includes/post.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();
}
源码链接
变更日志
| Version | Description |
|---|---|
| 3.4.0 | Introduced. |

