Make WordPress Core

Changeset 44119 for trunk


Ignore:
Timestamp:
12/13/2018 07:18:58 PM (6 years ago)
Author:
desrosj
Message:

Script loading: Fix regression after [43738].

After [43738], TinyMCE would be loaded earlier than before, which makes filters run at a different time relative to the loading of TinyMCE. Fix this by calling wp_print_scripts at the location where TinyMCE would previously be inserted as a <script> tag in the page.

Also, an TinyMCE translation related <script> that was mistakenly removed in [44115].

Props azaozz, omarreiss, swisspidy, atimmer.

Merges [43753], [43754] to trunk.

Fixes #45065.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

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

    r44115 r44119  
    14421442            script_concat_settings();
    14431443        }
     1444
     1445        wp_print_scripts( array( 'wp-tinymce' ) );
     1446
     1447        echo "<script type='text/javascript'>\n" . self::wp_mce_translation() . "</script>\n";
    14441448    }
    14451449
  • trunk/src/wp-includes/script-loader.php

    r44115 r44119  
    685685    $scripts->add( 'colorpicker', "/wp-includes/js/colorpicker$suffix.js", array( 'prototype' ), '3517m' );
    686686
    687     $scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array( 'wp-tinymce', 'utils', 'jquery' ), false, 1 );
     687    $scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array( 'utils', 'jquery' ), false, 1 );
    688688
    689689    // Back-compat for old DFW. To-do: remove at the end of 2016.
Note: See TracChangeset for help on using the changeset viewer.