Make WordPress Core

Changeset 44237


Ignore:
Timestamp:
12/16/2018 08:37:30 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Script Loader: Ensure default packages are registered when loaded via load-scripts.php.

Props CantoThemes, ocean90.
Merges [43877] to trunk.
Fixes #45271.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-admin/load-scripts.php

    r43580 r44237  
    3636$wp_scripts = new WP_Scripts();
    3737wp_default_scripts( $wp_scripts );
     38wp_default_packages_vendor( $wp_scripts );
     39wp_default_packages_scripts( $wp_scripts );
    3840
    3941if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $wp_version ) {
  • trunk/src/wp-includes/script-loader.php

    r44236 r44237  
    4444function wp_register_tinymce_scripts( &$scripts, $force_uncompressed = false ) {
    4545    global $tinymce_version, $concatenate_scripts, $compress_scripts;
    46     $suffix = SCRIPT_DEBUG ? '' : '.min';
     46    $suffix     = wp_scripts_get_suffix();
     47    $dev_suffix = wp_scripts_get_suffix( 'dev' );
    4748
    4849    script_concat_settings();
     
    5354    // Load tinymce.js when running from /src, otherwise load wp-tinymce.js.gz (in production) or
    5455    // tinymce.min.js (when SCRIPT_DEBUG is true).
    55     $mce_suffix = false !== strpos( get_bloginfo( 'version' ), '-src' ) ? '' : '.min';
    5656    if ( $compressed ) {
    5757        $scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . 'wp-tinymce.php', array(), $tinymce_version );
    5858    } else {
    59         $scripts->add( 'wp-tinymce-root', includes_url( 'js/tinymce/' ) . "tinymce$mce_suffix.js", array(), $tinymce_version );
    60         $scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . "plugins/compat3x/plugin$suffix.js", array( 'wp-tinymce-root' ), $tinymce_version );
     59        $scripts->add( 'wp-tinymce-root', includes_url( 'js/tinymce/' ) . "tinymce$dev_suffix.js", array(), $tinymce_version );
     60        $scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . "plugins/compat3x/plugin$dev_suffix.js", array( 'wp-tinymce-root' ), $tinymce_version );
    6161    }
    6262
     
    7575 */
    7676function wp_default_packages_vendor( &$scripts ) {
    77     wp_register_tinymce_scripts( $scripts );
    78 
    7977    $dev_suffix = wp_scripts_get_suffix( 'dev' );
    8078
Note: See TracChangeset for help on using the changeset viewer.