Script Loader: Ensure default packages are registered when loaded via load-scripts.php.
Props CantoThemes, ocean90. Merges [43877] to trunk. Fixes #45271. Built from https://develop.svn.wordpress.org/trunk@44237 git-svn-id: http://core.svn.wordpress.org/trunk@44067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c72f02aa49
commit
86bff28a19
|
@ -35,6 +35,8 @@ $out = '';
|
|||
|
||||
$wp_scripts = new WP_Scripts();
|
||||
wp_default_scripts( $wp_scripts );
|
||||
wp_default_packages_vendor( $wp_scripts );
|
||||
wp_default_packages_scripts( $wp_scripts );
|
||||
|
||||
if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $wp_version ) {
|
||||
$protocol = $_SERVER['SERVER_PROTOCOL'];
|
||||
|
|
|
@ -43,7 +43,8 @@ require( ABSPATH . WPINC . '/functions.wp-styles.php' );
|
|||
*/
|
||||
function wp_register_tinymce_scripts( &$scripts, $force_uncompressed = false ) {
|
||||
global $tinymce_version, $concatenate_scripts, $compress_scripts;
|
||||
$suffix = SCRIPT_DEBUG ? '' : '.min';
|
||||
$suffix = wp_scripts_get_suffix();
|
||||
$dev_suffix = wp_scripts_get_suffix( 'dev' );
|
||||
|
||||
script_concat_settings();
|
||||
|
||||
|
@ -52,12 +53,11 @@ function wp_register_tinymce_scripts( &$scripts, $force_uncompressed = false ) {
|
|||
|
||||
// Load tinymce.js when running from /src, otherwise load wp-tinymce.js.gz (in production) or
|
||||
// tinymce.min.js (when SCRIPT_DEBUG is true).
|
||||
$mce_suffix = false !== strpos( get_bloginfo( 'version' ), '-src' ) ? '' : '.min';
|
||||
if ( $compressed ) {
|
||||
$scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . 'wp-tinymce.php', array(), $tinymce_version );
|
||||
} else {
|
||||
$scripts->add( 'wp-tinymce-root', includes_url( 'js/tinymce/' ) . "tinymce$mce_suffix.js", array(), $tinymce_version );
|
||||
$scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . "plugins/compat3x/plugin$suffix.js", array( 'wp-tinymce-root' ), $tinymce_version );
|
||||
$scripts->add( 'wp-tinymce-root', includes_url( 'js/tinymce/' ) . "tinymce$dev_suffix.js", array(), $tinymce_version );
|
||||
$scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . "plugins/compat3x/plugin$dev_suffix.js", array( 'wp-tinymce-root' ), $tinymce_version );
|
||||
}
|
||||
|
||||
$scripts->add( 'wp-tinymce-lists', includes_url( "js/tinymce/plugins/lists/plugin$suffix.js", array( 'wp-tinymce' ), $tinymce_version ) );
|
||||
|
@ -74,8 +74,6 @@ function wp_register_tinymce_scripts( &$scripts, $force_uncompressed = false ) {
|
|||
* @param WP_Scripts $scripts WP_Scripts object.
|
||||
*/
|
||||
function wp_default_packages_vendor( &$scripts ) {
|
||||
wp_register_tinymce_scripts( $scripts );
|
||||
|
||||
$dev_suffix = wp_scripts_get_suffix( 'dev' );
|
||||
|
||||
$vendor_scripts = array(
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.1-alpha-44236';
|
||||
$wp_version = '5.1-alpha-44237';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue