Make WordPress Core

Changeset 48890 for trunk


Ignore:
Timestamp:
08/27/2020 08:31:23 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Script Loader: Change the jquery handle back to an alias for jquery-core.

This ensures that wp_localize_script( 'jquery', ... ) continues to work as expected, since WP_Scripts::localize() rewrites the jquery handle to jquery-core internally.

Follow-up to [48323].

Props mukesh27, rajeshsingh520, johnbillion, TimothyBlynJacobs, TobiasBg.
Fixes #50919.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r48754 r48890  
    720720
    721721    // jQuery.
    722     $scripts->add( 'jquery', '/wp-includes/js/jquery/jquery.js', array(), '1.12.4-wp' );
     722    $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.12.4-wp' );
    723723    $scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.12.4-wp' );
    724724    $scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '1.4.1' );
Note: See TracChangeset for help on using the changeset viewer.