WordPress.org

Make WordPress Core

Changeset 43222


Ignore:
Timestamp:
05/10/2018 07:49:32 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.
Fixes #43969.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-editor.php

    r42746 r43222  
    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)
Note: See TracChangeset for help on using the changeset viewer.