Media: Remove deprecated click function in media uploader.

Replace the call to jQuery's deprecated click handler.

Props kapilpaul.
Fixes #53261.
Built from https://develop.svn.wordpress.org/trunk@51947


git-svn-id: http://core.svn.wordpress.org/trunk@51536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
joedolson 2021-10-28 17:50:58 +00:00
parent d71ae9a7e3
commit 2f3b779563
3 changed files with 4 additions and 4 deletions

View File

@ -149,7 +149,7 @@ function prepareMediaItemInit( fileObj ) {
jQuery( '.filename.original', item ).replaceWith( jQuery( '.filename.new', item ) ); jQuery( '.filename.original', item ).replaceWith( jQuery( '.filename.new', item ) );
// Bind Ajax to the new Delete button. // 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. // Tell the server to delete it. TODO: Handle exceptions.
jQuery.ajax({ jQuery.ajax({
url: ajaxurl, url: ajaxurl,
@ -167,7 +167,7 @@ function prepareMediaItemInit( fileObj ) {
}); });
// Bind Ajax to the new Undo button. // 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. // Tell the server to untrash it. TODO: Handle exceptions.
jQuery.ajax({ jQuery.ajax({
url: ajaxurl, url: ajaxurl,

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.9-alpha-51946'; $wp_version = '5.9-alpha-51947';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.