remove_theme_support()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
remove_theme_support( string $feature ): bool|void
Описание
Должна вызываться в файле functions.php темы. Обычно используется дочерними темами для переопределения поддержки родительской темы.
См. alsoadd_theme_support()
Оригинал (английский)
Should be called in the theme’s functions.php file. Generally would be used for child themes to override support from the parent theme.
Параметры
$feature
string
обязательный
Возвращаемое значение
bool|void
Исходный код
wp-includes/theme.php:3067
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 );
}
История изменений
| Версия | Описание |
|---|---|
| 3.0.0 | Introduced. |

