From 7b5f40133a7c35afd535249547a8013bdd619f42 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Thu, 10 May 2018 19:50:21 +0000 Subject: [PATCH] TinyMCE: switch off concatenation when a custom TinyMCE theme is used. Prevents conflict with the default theme as it loads first. Props programmin, azaozz. Fixes #43969. Built from https://develop.svn.wordpress.org/trunk@43222 git-svn-id: http://core.svn.wordpress.org/trunk@43051 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-editor.php | 10 +++++++++- wp-includes/version.php | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php index 7ce043a896..b9ba53be9a 100644 --- a/wp-includes/class-wp-editor.php +++ b/wp-includes/class-wp-editor.php @@ -1411,8 +1411,16 @@ final class _WP_Editors { $version = 'ver=' . $tinymce_version; $baseurl = self::get_baseurl(); + $has_custom_theme = false; + foreach ( self::$mce_settings as $init ) { + if ( ! empty( $init['theme_url'] ) ) { + $has_custom_theme = true; + break; + } + } + $compressed = $compress_scripts && $concatenate_scripts && isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) - && false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ); + && false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) && ! $has_custom_theme; // Load tinymce.js when running from /src, else load wp-tinymce.js.gz (production) or tinymce.min.js (SCRIPT_DEBUG) $mce_suffix = false !== strpos( get_bloginfo( 'version' ), '-src' ) ? '' : '.min'; diff --git a/wp-includes/version.php b/wp-includes/version.php index a22b2850b1..51d2feee83 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-43220'; +$wp_version = '5.0-alpha-43222'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.