WordPress.org

Make WordPress Core

Changeset 43877


Ignore:
Timestamp:
11/08/2018 09:23:10 AM (12 months ago)
Author:
ocean90
Message:

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

Props CantoThemes, ocean90.
See #45271.

Location:
branches/5.0/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-admin/load-scripts.php

    r43697 r43877  
    3333
    3434$wp_scripts = new WP_Scripts();
    35 wp_default_scripts($wp_scripts);
     35wp_default_scripts( $wp_scripts );
     36wp_default_packages_vendor( $wp_scripts );
     37wp_default_packages_scripts( $wp_scripts );
    3638
    3739if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $wp_version ) {
  • branches/5.0/src/wp-includes/script-loader.php

    r43867 r43877  
    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.