post_type_supports( string $post_type, string $feature )
Check a post type’s support for a given feature.
(string) (Required) The post type being checked.
(string) (Required) The feature being checked.
(bool) Whether the post type supports the given feature.
More Information More Information
The $feature variable in the function will accept the following string values:
- ‘editor’ (content)
- ‘thumbnail’ (featured image) (current theme must also support Post Thumbnails)
- ‘custom-fields’ (see Custom_Fields, aka meta-data)
- ‘comments’ (also will see comment count balloon on edit screen)
- ‘revisions’ (will store revisions)
- ‘page-attributes’ (template and menu order) (hierarchical must be true)
- ‘post-formats’ (see Post_Formats)
Please note in the ‘thumbnail’ value you can also use ‘attachment:audio’ and ‘attachment:video’ .
If the value is not available it will return false.
You can send any string in this field and it will return false unless you are checking for an accepted value.
View on Trac