Make WordPress Core


Ignore:
Timestamp:
11/30/2021 05:16:13 PM (4 years ago)
Author:
hellofromTonya
Message:

External Libraries: Further fix jQuery deprecations in WordPress core.

Follow-up to [50001], [50270], [50367], [50383], [50410], [50420], [50429], [50547].

Props chaion07, Clorith, costdev, desrosj, malthert, peterwilsoncc, presskopp, promz, sabernhardt, SergeyBiryukov, toro_unit, wpnomad.
Fixes #51519.

File:
1 edited

Legend:

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

    r52254 r52285  
    534534    ?>
    535535    <script type="text/javascript">
    536     addLoadEvent = function(func){if(typeof jQuery!=='undefined')jQuery(document).ready(func);else if(typeof wpOnload!=='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
     536    addLoadEvent = function(func){if(typeof jQuery!=='undefined')jQuery(function(){func();});else if(typeof wpOnload!=='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
    537537    var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?>', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',
    538538    isRtl = <?php echo (int) is_rtl(); ?>;
     
    25022502    };
    25032503
    2504     jQuery(document).ready( function($) {
     2504    jQuery( function($) {
    25052505        $('.media-types input').click( function() {
    25062506            $('table.describe').toggleClass('not-image', $('#not-image').prop('checked') );
    25072507        });
    2508     });
     2508    } );
    25092509    </script>
    25102510
Note: See TracChangeset for help on using the changeset viewer.