post_type_supports

The timeline below displays how wordpress function post_type_supports has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Checks a post type's support for a given feature.
 *
 * @since 3.0.0
 *
 * @global array $_wp_post_type_features
 *
 * @param string $post_type The post type being checked.
 * @param string $feature   The feature being checked.
 * @return bool Whether the post type supports the given feature.
 */
function post_type_supports($post_type, $feature)
{
    global $_wp_post_type_features;
    return isset($_wp_post_type_features[$post_type][$feature]);
}

WordPress Version: 4.3

/**
 * Check a post type's support for a given feature.
 *
 * @since 3.0.0
 *
 * @global array $_wp_post_type_features
 *
 * @param string $post_type The post type being checked.
 * @param string $feature   The feature being checked.
 * @return bool Whether the post type supports the given feature.
 */
function post_type_supports($post_type, $feature)
{
    global $_wp_post_type_features;
    return isset($_wp_post_type_features[$post_type][$feature]);
}

WordPress Version: 4.0

/**
 * Check a post type's support for a given feature.
 *
 * @since 3.0.0
 *
 * @param string $post_type The post type being checked.
 * @param string $feature the feature being checked.
 * @return bool Whether the post type supports the given feature.
 */
function post_type_supports($post_type, $feature)
{
    global $_wp_post_type_features;
    return isset($_wp_post_type_features[$post_type][$feature]);
}

WordPress Version: 3.7

/**
 * Checks a post type's support for a given feature
 *
 * @since 3.0.0
 * @param string $post_type The post type being checked
 * @param string $feature the feature being checked
 * @return boolean
 */
function post_type_supports($post_type, $feature)
{
    global $_wp_post_type_features;
    return isset($_wp_post_type_features[$post_type][$feature]);
}