Script Loader: Ensure default packages are registered when loaded via load-scripts.php.
Props CantoThemes, ocean90. See #45271. Built from https://develop.svn.wordpress.org/branches/5.0@43877 git-svn-id: http://core.svn.wordpress.org/branches/5.0@43706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1e73770c39
commit
3d6cb1b458
|
@ -32,7 +32,9 @@ $expires_offset = 31536000; // 1 year
|
|||
$out = '';
|
||||
|
||||
$wp_scripts = new WP_Scripts();
|
||||
wp_default_scripts($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(
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-beta3-43876';
|
||||
$wp_version = '5.0-beta3-43877';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue