post_type_supports( string $post_type, string $feature )

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


Parameters

$post_type

(Required) The post type being checked.

$feature

(Required) The feature being checked.


Return

(bool) Whether the post type supports the given feature.


Source

File: wp-includes/post.php

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

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


Changelog

Changelog
Version Description
WP-3.0.0 Introduced.