remove_editor_styles

函数
remove_editor_styles ( No parameters )
返回值
  • (bool) True on success, false if there were no stylesheets to remove.
定义位置
相关方法
add_editor_styleget_editor_stylesheetsremove_roleget_block_editor_theme_stylesprint_emoji_styles
引入
3.1.0
弃用
-

remove_editor_styles: 这个函数用来删除WordPress中的编辑器样式。编辑器样式是用来定制WordPress中编辑器的外观的: 这个函数不需要参数。

移除所有可视化编辑器的样式表。

function remove_editor_styles() {
	if ( ! current_theme_supports( 'editor-style' ) ) {
		return false;
	}
	_remove_theme_support( 'editor-style' );
	if ( is_admin() ) {
		$GLOBALS['editor_styles'] = array();
	}
	return true;
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-14 21:36:41

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: