remove_post_type_support

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

WordPress Version: 6.1

/**
 * Removes support for a feature from a post type.
 *
 * @since 3.0.0
 *
 * @global array $_wp_post_type_features
 *
 * @param string $post_type The post type for which to remove the feature.
 * @param string $feature   The feature being removed.
 */
function remove_post_type_support($post_type, $feature)
{
    global $_wp_post_type_features;
    unset($_wp_post_type_features[$post_type][$feature]);
}

WordPress Version: 4.3

/**
 * Remove support for a feature from a post type.
 *
 * @since 3.0.0
 *
 * @global array $_wp_post_type_features
 *
 * @param string $post_type The post type for which to remove the feature.
 * @param string $feature   The feature being removed.
 */
function remove_post_type_support($post_type, $feature)
{
    global $_wp_post_type_features;
    unset($_wp_post_type_features[$post_type][$feature]);
}

WordPress Version: 4.0

/**
 * Remove support for a feature from a post type.
 *
 * @since 3.0.0
 *
 * @param string $post_type The post type for which to remove the feature.
 * @param string $feature   The feature being removed.
 */
function remove_post_type_support($post_type, $feature)
{
    global $_wp_post_type_features;
    if (isset($_wp_post_type_features[$post_type][$feature])) {
        unset($_wp_post_type_features[$post_type][$feature]);
    }
}

WordPress Version: 3.7

/**
 * Remove support for a feature from a post type.
 *
 * @since 3.0.0
 * @param string $post_type The post type for which to remove the feature
 * @param string $feature The feature being removed
 */
function remove_post_type_support($post_type, $feature)
{
    global $_wp_post_type_features;
    if (isset($_wp_post_type_features[$post_type][$feature])) {
        unset($_wp_post_type_features[$post_type][$feature]);
    }
}