WordPress.org

Make WordPress Core

Changeset 43224


Ignore:
Timestamp:
05/10/2018 07:53:18 PM (2 years ago)
Author:
azaozz
Message:

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.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/class-wp-editor.php

    r41917 r43224  
    14021402        $baseurl = self::get_baseurl();
    14031403
    1404         $compressed = $compress_scripts && $concatenate_scripts && isset($_SERVER['HTTP_ACCEPT_ENCODING'])
    1405             && false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip');
     1404        $has_custom_theme = false;
     1405        foreach ( self::$mce_settings as $init ) {
     1406            if ( ! empty( $init['theme_url'] ) ) {
     1407                $has_custom_theme = true;
     1408                break;
     1409            }
     1410        }
     1411
     1412        $compressed = $compress_scripts && $concatenate_scripts && isset( $_SERVER['HTTP_ACCEPT_ENCODING'] )
     1413            && false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) && ! $has_custom_theme;
    14061414
    14071415        // Load tinymce.js when running from /src, else load wp-tinymce.js.gz (production) or tinymce.min.js (SCRIPT_DEBUG)
Note: See TracChangeset for help on using the changeset viewer.