Make WordPress Core


Ignore:
Timestamp:
01/22/2021 12:30:39 PM (4 years ago)
Author:
SergeyBiryukov
Message:

External Libraries: First pass at fixing jQuery deprecations in WordPress core and bundled themes.

To be able to disable jQuery Migrate as step 3 of updating the jQuery version shipped with WordPress, all JQMIGRATE warnings in the browser console will have to be addressed.

This includes many minor adjustments to a wide array of core files.

Follow-up to:

Props Clorith, azaozz.
See #51812.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/options.php

    r47808 r50001  
    1919        var parent = $( '#show_avatars' ),
    2020            children = $( '.avatar-settings' );
    21         parent.change(function(){
     21        parent.on( 'change', function(){
    2222            children.toggleClass( 'hide-if-js', ! this.checked );
    2323        });
     
    5050        });
    5151
    52         $( 'input[name="date_format"]' ).click( function() {
     52        $( 'input[name="date_format"]' ).on( 'click', function() {
    5353            if ( 'date_format_custom_radio' !== $(this).attr( 'id' ) )
    5454                $( 'input[name="date_format_custom"]' ).val( $( this ).val() ).closest( 'fieldset' ).find( '.example' ).text( $( this ).parent( 'label' ).children( '.format-i18n' ).text() );
     
    5959        });
    6060
    61         $( 'input[name="time_format"]' ).click( function() {
     61        $( 'input[name="time_format"]' ).on( 'click', function() {
    6262            if ( 'time_format_custom_radio' !== $(this).attr( 'id' ) )
    6363                $( 'input[name="time_format_custom"]' ).val( $( this ).val() ).closest( 'fieldset' ).find( '.example' ).text( $( this ).parent( 'label' ).children( '.format-i18n' ).text() );
     
    9090
    9191        var languageSelect = $( '#WPLANG' );
    92         $( 'form' ).submit( function() {
     92        $( 'form' ).on( 'submit', function() {
    9393            // Don't show a spinner for English and installed languages,
    9494            // as there is nothing to download.
     
    118118            };
    119119        check_disabled();
    120         section.find( 'input:radio' ).change( check_disabled );
     120        section.find( 'input:radio' ).on( 'change', check_disabled );
    121121    });
    122122</script>
Note: See TracChangeset for help on using the changeset viewer.