Make WordPress Core

Changeset 43753


Ignore:
Timestamp:
10/18/2018 01:21:03 PM (6 years ago)
Author:
atimmer
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.

Props azaozz, omarreiss.
Fixes #45065.

Location:
branches/5.0/src/wp-includes
Files:
2 edited

Legend:

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

    r43738 r43753  
    14251425            script_concat_settings();
    14261426        }
     1427
     1428        wp_print_scripts( [ 'wp-tinymce' ] );
    14271429
    14281430        echo "<script type='text/javascript'>\n" . self::wp_mce_translation() . "</script>\n";
  • branches/5.0/src/wp-includes/script-loader.php

    r43738 r43753  
    671671    $scripts->add( 'colorpicker', "/wp-includes/js/colorpicker$suffix.js", array('prototype'), '3517m' );
    672672
    673     $scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array('wp-tinymce','utils','jquery'), false, 1 );
     673    $scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array('utils','jquery'), false, 1 );
    674674
    675675    // Back-compat for old DFW. To-do: remove at the end of 2016.
Note: See TracChangeset for help on using the changeset viewer.