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.

Built from https://develop.svn.wordpress.org/branches/5.0@43753


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
atimmer 2018-10-18 13:22:26 +00:00
parent 798c2581b1
commit ab6b171b1d
3 changed files with 4 additions and 2 deletions

View File

@ -1425,6 +1425,8 @@ final class _WP_Editors {
script_concat_settings();
}
wp_print_scripts( [ 'wp-tinymce' ] );
echo "<script type='text/javascript'>\n" . self::wp_mce_translation() . "</script>\n";
}

View File

@ -670,7 +670,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'colorpicker', "/wp-includes/js/colorpicker$suffix.js", array('prototype'), '3517m' );
$scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array('wp-tinymce','utils','jquery'), false, 1 );
$scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array('utils','jquery'), false, 1 );
// Back-compat for old DFW. To-do: remove at the end of 2016.
$scripts->add( 'wp-fullscreen-stub', "/wp-admin/js/wp-fullscreen-stub$suffix.js", array(), false, 1 );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-43752';
$wp_version = '5.0-alpha-43753';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.