WordPress at a glance

post_type_supports() WP 1.0

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

  • Global. Array. $_wp_post_type_features
✈ 1 time = 0.000018s = very fast | 50000 times = 0.04s = speed of light

No Hooks.

Return

true/false. Whether the post type supports the given feature.

Usage

post_type_supports( $post_type, $feature );
$post_type(string) (required)
The post type being checked.
$feature(string) (required)
The feature being checked.

Code of post_type_supports: wp-includes/post.php VER 4.9.8

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

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

Related Functions

From tag: Custom post type (post_type)

More from category: Custom Types

No comments
    Hello, !     Log In . Register