Upload: improve legacy SWFUpload event handlers for current jQuery.

Fix an issue where legacy JavaScript for SWFUpload still used jQuery's 
deprecated `live` event which no longer works - switch to using `on`.
This JavaScript is still used by some plugins and themes.

Props MMDeveloper.
Fixes #39886.


Built from https://develop.svn.wordpress.org/trunk@40431


git-svn-id: http://core.svn.wordpress.org/trunk@40329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Adam Silverstein 2017-04-14 16:43:44 +00:00
parent 999c807b88
commit 9ff1301ae5
2 changed files with 3 additions and 3 deletions

View File

@ -356,7 +356,7 @@ function cancelUpload() {
// remember the last used image size, alignment and url
jQuery(document).ready(function($){
$('input[type="radio"]', '#media-items').live('click', function(){
$( 'input[type="radio"]', '#media-items' ).on( 'click', function(){
var tr = $(this).closest('tr');
if ( $(tr).hasClass('align') )
@ -365,7 +365,7 @@ jQuery(document).ready(function($){
setUserSetting('imgsize', $(this).val());
});
$('button.button', '#media-items').live('click', function(){
$( 'button.button', '#media-items' ).on( 'click', function(){
var c = this.className || '';
c = c.match(/url([^ '"]+)/);
if ( c && c[1] ) {

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-40430';
$wp_version = '4.8-alpha-40431';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.