TinyMCE: switch off concatenation when a custom TinyMCE theme is used. Prevents conflict with the default theme as it loads first.

Props programmin, azaozz.
Merges [43222] to the 4.9 branch.
Fixes #43969.
Built from https://develop.svn.wordpress.org/branches/4.9@43224


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2018-05-10 19:54:25 +00:00
parent faca308a47
commit 8e660e35d1
2 changed files with 11 additions and 3 deletions

View File

@ -1401,8 +1401,16 @@ final class _WP_Editors {
$version = 'ver=' . $tinymce_version;
$baseurl = self::get_baseurl();
$compressed = $compress_scripts && $concatenate_scripts && isset($_SERVER['HTTP_ACCEPT_ENCODING'])
&& false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip');
$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' ) && ! $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';

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9.6-beta1-43221';
$wp_version = '4.9.6-beta1-43224';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.