wpseek.com
WordPress开发者和主题制作者的搜索引擎



remove_theme_support › WordPress Function

Since3.0.0
已弃用n/a
remove_theme_support ( $feature )
参数:
  • (string) $feature The feature being removed. See add_theme_support() for the list of possible values.
    Required: Yes
查看:
返回:
  • (bool|void) Whether feature was removed.
定义在:
文档:

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.


源码

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 );
}