remove_theme_support()

允许主题取消注册对特定功能的支持

remove_theme_support( string $feature )

说明(Description)

应该在主题的function.php文件。通常用于子主题以覆盖父主题的支持。


参数(Parameters)

参数类型必填说明
$feature(string)必需正在删除的功能。

返回(Return)

(bool|void)是否删除了功能。


源码(Source)

/**
 * 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.
 * 星空站长网 (xingkongweb.com)
 */
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 );
}
更新版本源码位置使用被使用
3.0.0wp-includes/theme.php:273921 function
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索