From 965a38fc82d998ac921d42dc20f7614583688fc7 Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Thu, 28 Oct 2021 17:49:08 +0000 Subject: [PATCH] Media: Remove deprecated click function in media uploader. Replace the call to jQuery's deprecated click handler. Props kapilpaul. Fixes #53261. git-svn-id: https://develop.svn.wordpress.org/trunk@51947 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/_enqueues/vendor/plupload/handlers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/_enqueues/vendor/plupload/handlers.js b/src/js/_enqueues/vendor/plupload/handlers.js index 2560495b76..fa602daf43 100644 --- a/src/js/_enqueues/vendor/plupload/handlers.js +++ b/src/js/_enqueues/vendor/plupload/handlers.js @@ -149,7 +149,7 @@ function prepareMediaItemInit( fileObj ) { jQuery( '.filename.original', item ).replaceWith( jQuery( '.filename.new', item ) ); // Bind Ajax to the new Delete button. - jQuery( 'a.delete', item ).click( function(){ + jQuery( 'a.delete', item ).on( 'click', function(){ // Tell the server to delete it. TODO: Handle exceptions. jQuery.ajax({ url: ajaxurl, @@ -167,7 +167,7 @@ function prepareMediaItemInit( fileObj ) { }); // Bind Ajax to the new Undo button. - jQuery( 'a.undo', item ).click( function(){ + jQuery( 'a.undo', item ).on( 'click', function(){ // Tell the server to untrash it. TODO: Handle exceptions. jQuery.ajax({ url: ajaxurl,