Gets all the post type features
Parameters
$post_type
stringrequired- The post type.
Source
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();
}
Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |
The return value of this function is an associative array, not a list.
For example, if a post type supports the ‘title’ and ‘editor’ features, the return value will be:
It will not be the list: