remove_theme_support

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

WordPress Version: 5.5

/**
 * Allows a theme to de-register its support of a certain feature
 *
 * Should be called in the theme's functions.php file. Generally would
 * be used for child themes to override support from the parent theme.
 *
 * @since 3.0.0
 *
 * @see add_theme_support()
 *
 * @param string $feature The feature being removed. See add_theme_support() for the list
 *                        of possible values.
 * @return bool|void Whether feature was removed.
 */
function remove_theme_support($feature)
{
    // Do not remove internal registrations that are not used directly by themes.
    if (in_array($feature, array('editor-style', 'widgets', 'menus'), true)) {
        return false;
    }
    return _remove_theme_support($feature);
}

WordPress Version: 5.2

/**
 * Allows a theme to de-register its support of a certain feature
 *
 * Should be called in the theme's functions.php file. Generally would
 * be used for child themes to override support from the parent theme.
 *
 * @since 3.0.0
 * @see add_theme_support()
 * @param string $feature The feature being removed.
 * @return bool|void Whether feature was removed.
 */
function remove_theme_support($feature)
{
    // Blacklist: for internal registrations not used directly by themes.
    if (in_array($feature, array('editor-style', 'widgets', 'menus'))) {
        return false;
    }
    return _remove_theme_support($feature);
}

WordPress Version: 4.3

/**
 * Allows a theme to de-register its support of a certain feature
 *
 * Should be called in the theme's functions.php file. Generally would
 * be used for child themes to override support from the parent theme.
 *
 * @since 3.0.0
 * @see add_theme_support()
 * @param string $feature the feature being added
 * @return bool|void Whether feature was removed.
 */
function remove_theme_support($feature)
{
    // Blacklist: for internal registrations not used directly by themes.
    if (in_array($feature, array('editor-style', 'widgets', 'menus'))) {
        return false;
    }
    return _remove_theme_support($feature);
}

WordPress Version: 4.1

/**
 * Allows a theme to de-register its support of a certain feature
 *
 * Should be called in the theme's functions.php file. Generally would
 * be used for child themes to override support from the parent theme.
 *
 * @since 3.0.0
 * @see add_theme_support()
 * @param string $feature the feature being added
 * @return null|bool Whether feature was removed.
 */
function remove_theme_support($feature)
{
    // Blacklist: for internal registrations not used directly by themes.
    if (in_array($feature, array('editor-style', 'widgets', 'menus'))) {
        return false;
    }
    return _remove_theme_support($feature);
}

WordPress Version: 3.7

/**
 * Allows a theme to de-register its support of a certain feature
 *
 * Should be called in the theme's functions.php file. Generally would
 * be used for child themes to override support from the parent theme.
 *
 * @since 3.0.0
 * @see add_theme_support()
 * @param string $feature the feature being added
 * @return bool Whether feature was removed.
 */
function remove_theme_support($feature)
{
    // Blacklist: for internal registrations not used directly by themes.
    if (in_array($feature, array('editor-style', 'widgets', 'menus'))) {
        return false;
    }
    return _remove_theme_support($feature);
}