remove_editor_styles() WordPress Function

The remove_editor_styles() function is used to remove any editor-specific stylesheet from the WordPress editor. This function is useful for theme developers who want to disable the default stylesheet in the WordPress editor.

remove_editor_styles() #

Removes all visual editor stylesheets.


Return

(bool) True on success, false if there were no stylesheets to remove.


Top ↑

Source

File: wp-includes/theme.php

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


Top ↑

Changelog

Changelog
VersionDescription
3.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More