Force uncompressed TinyMCE when a custom theme has been defined.

Description Description

The compressed TinyMCE file cannot deal with custom themes, so this makes sure that we use the uncompressed TinyMCE file if a theme is defined. Even if we are on a production environment.

Source Source

File: wp-includes/class-wp-editor.php

	public static function force_uncompressed_tinymce() {
		$has_custom_theme = false;
		foreach ( self::$mce_settings as $init ) {
			if ( ! empty( $init['theme_url'] ) ) {
				$has_custom_theme = true;

		if ( ! $has_custom_theme ) {

		$wp_scripts = wp_scripts();

		$wp_scripts->remove( 'wp-tinymce' );
		wp_register_tinymce_scripts( $wp_scripts, true );

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.