post_type_supports( string $post_type, string $feature )

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


Description Description


Parameters Parameters

$post_type

(string) (Required) The post type being checked.

$feature

(string) (Required) The feature being checked.


Top ↑

Return Return

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


Top ↑

Source 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] ) );
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.