A WordPress-centric search engine for devs and theme authors



post_type_supports ›

Since3.0.0
Deprecatedn/a
post_type_supports ( $post_type, $feature )
Parameters: (2)
  • (string) $post_type The post type being checked.
    Required: Yes
  • (string) $feature The feature being checked.
    Required: Yes
Returns:
  • (bool) Whether the post type supports the given feature.
Defined at:
Codex:

Check a post type's support for a given feature.



Source

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

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