Advertisements

post_type_supports

Definition:
function post_type_supports( $post_type, $feature ) {}

Checks a post type’s support for a given feature

Parameters

  • string $post_type: The post type being checked
  • string $feature: the feature being checked

Source code

function post_type_supports( $post_type, $feature ) {

	global $_wp_post_type_features;



	if ( !isset( $_wp_post_type_features[$post_type][$feature] ) )

		return false;



	// If no args passed then no extra checks need be performed

	if ( func_num_args() <= 2 )

		return true;



	// @todo Allow pluggable arg checking

	//$args = array_slice( func_get_args(), 2 );



	return true;

}

2597

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: