External Libraries: Further fix jQuery deprecations in WordPress core.

This replaces calls to the deprecated jQuery `.bind()` method with `.on()` in Plupload's `handlers.js`.

Reference: [https://api.jquery.com/bind/ jQuery API Documentation: .bind()]

Follow-up to [18482], [19266], [50001], [50270], [50367], [50383], [50410], [50420], [50429], [50627], [51947], [52429].

Props eclev91, ipajen, sarahricker.
See #51812.

git-svn-id: https://develop.svn.wordpress.org/trunk@54495 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2022-10-11 17:35:05 +00:00
parent 628e83d157
commit bb0ef7cb0e

View File

@ -399,7 +399,7 @@ jQuery( document ).ready( function( $ ) {
var tryAgainCount = {};
var tryAgain;
$( '.media-upload-form' ).bind( 'click.uploader', function( e ) {
$( '.media-upload-form' ).on( 'click.uploader', function( e ) {
var target = $( e.target ), tr, c;
if ( target.is( 'input[type="radio"]' ) ) { // Remember the last used image size and alignment.
@ -557,7 +557,7 @@ jQuery( document ).ready( function( $ ) {
uploader_init = function() {
uploader = new plupload.Uploader( wpUploaderInit );
$( '#image_resize' ).bind( 'change', function() {
$( '#image_resize' ).on( 'change', function() {
var arg = $( this ).prop( 'checked' );
setResize( arg );