Skip to content

Commit 29a63fe

Browse files
committed
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. git-svn-id: https://develop.svn.wordpress.org/trunk@43222 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 07feb01 commit 29a63fe

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/wp-includes/class-wp-editor.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1411,8 +1411,16 @@ public static function print_tinymce_scripts() {
14111411
$version = 'ver=' . $tinymce_version;
14121412
$baseurl = self::get_baseurl();
14131413

1414+
$has_custom_theme = false;
1415+
foreach ( self::$mce_settings as $init ) {
1416+
if ( ! empty( $init['theme_url'] ) ) {
1417+
$has_custom_theme = true;
1418+
break;
1419+
}
1420+
}
1421+
14141422
$compressed = $compress_scripts && $concatenate_scripts && isset( $_SERVER['HTTP_ACCEPT_ENCODING'] )
1415-
&& false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' );
1423+
&& false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) && ! $has_custom_theme;
14161424

14171425
// Load tinymce.js when running from /src, else load wp-tinymce.js.gz (production) or tinymce.min.js (SCRIPT_DEBUG)
14181426
$mce_suffix = false !== strpos( get_bloginfo( 'version' ), '-src' ) ? '' : '.min';

0 commit comments

Comments
 (0)