Skip to content

Commit 9116c25

Browse files
committed
Release new version 2.4.5
= 2.4.5 - 2021/03/17 = * This maintenance release updates 23 deprecated jQuery functions for compatibility with the latest version of jQuery in WordPress 5.7 * Tweak - Update JavaScript on plugin framework for compatibility with latest version of jQuery and resolve PHP warning event shorthand is deprecated. * Tweak - Replace deprecated .change( handler ) with .on( 'change', handler ) * Tweak - Replace deprecated .change() with .trigger('change') * Tweak - Replace deprecated .focus( handler ) with .on( 'focus', handler ) * Tweak - Replace deprecated .focus() with .trigger('focus') * Tweak - Replace deprecated .click( handler ) with .on( 'click', handler ) * Tweak - Replace deprecated .click() with .trigger('click') * Tweak - Replace deprecated .select( handler ) with .on( 'select', handler ) * Tweak - Replace deprecated .select() with .trigger('select') * Tweak - Replace deprecated .blur( handler ) with .on( 'blur', handler ) * Tweak - Replace deprecated .blur() with .trigger('blur') * Tweak - Replace deprecated .resize( handler ) with .on( 'resize', handler ) * Tweak - Replace deprecated .submit( handler ) with .on( 'submit', handler ) * Tweak - Replace deprecated .scroll( handler ) with .on( 'scroll', handler ) * Tweak - Replace deprecated .mousedown( handler ) with .on( 'mousedown', handler ) * Tweak - Replace deprecated .mouseover( handler ) with .on( 'mouseover', handler ) * Tweak - Replace deprecated .mouseout( handler ) with .on( 'mouseout', handler ) * Tweak - Replace deprecated .keydown( handler ) with .on( 'keydown', handler ) * Tweak - Replace deprecated .attr('disabled', 'disabled') with .prop('disabled', true) * Tweak - Replace deprecated .removeAttr('disabled') with .prop('disabled', false) * Tweak - Replace deprecated .attr('selected', 'selected') with .prop('selected', true) * Tweak - Replace deprecated .removeAttr('selected') with .prop('selected', false) * Tweak - Replace deprecated .attr('checked', 'checked') with .prop('checked', true) * Tweak - Replace deprecated .removeAttr('checked') with .prop('checked', false)
1 parent 3e0930c commit 9116c25

13 files changed

+66
-36
lines changed

a3-lazy-load.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
Plugin Name: a3 Lazy Load
44
Description: Speed up your site and enhance frontend user's visual experience in PC's, Tablets and mobile with a3 Lazy Load.
5-
Version: 2.4.4
5+
Version: 2.4.5
66
Author: a3rev Software
77
Author URI: https://a3rev.com/
88
Requires at least: 5.0
@@ -31,7 +31,7 @@
3131

3232
define( 'A3_LAZY_LOAD_KEY', 'a3_lazy_load' );
3333
define( 'A3_LAZY_LOAD_PREFIX', 'a3_lazy_load_' );
34-
define( 'A3_LAZY_VERSION', '2.4.4' );
34+
define( 'A3_LAZY_VERSION', '2.4.5' );
3535
define( 'A3_LAZY_LOAD_G_FONTS', false );
3636

3737
use \A3Rev\LazyLoad\FrameWork;

admin/assets/js/admin-ui-script.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
onChange: function(elem, value) {
148148
var status = value.toString();
149149
if ( status == 'true') {
150-
$('input[name="' + input_name + '"]').not(current_item).removeAttr('checked').removeAttr('checkbox-disabled').iphoneStyle("refresh");
150+
$('input[name="' + input_name + '"]').not(current_item).prop('checked',false).removeAttr('checkbox-disabled').iphoneStyle("refresh");
151151
}
152152
$('input[name="' + input_name + '"]').trigger("a3rev-ui-onoff_radio-switch", [elem.val(), status]);
153153
},
@@ -165,28 +165,28 @@
165165
/* Apply for normal checkbox */
166166
$('.a3rev_panel_container .hide_options_if_checked').each(function(){
167167

168-
$(this).find('input').eq(0).change(function() {
168+
$(this).find('input').eq(0).on( 'change', function() {
169169

170170
if ($(this).is(':checked')) {
171171
$(this).closest('fieldset, tr').nextUntil( '.hide_options_if_checked, .show_options_if_checked', '.hidden_option').hide();
172172
} else {
173173
$(this).closest('fieldset, tr').nextUntil( '.hide_options_if_checked, .show_options_if_checked', '.hidden_option').show();
174174
}
175175

176-
}).change();
176+
}).trigger('change');
177177

178178
});
179179
$('.a3rev_panel_container .show_options_if_checked').each(function(){
180180

181-
$(this).find('input').eq(0).change(function() {
181+
$(this).find('input').eq(0).on( 'change', function() {
182182

183183
if ($(this).is(':checked')) {
184184
$(this).closest('fieldset, tr').nextUntil( '.hide_options_if_checked, .show_options_if_checked', '.hidden_option').show();
185185
} else {
186186
$(this).closest('fieldset, tr').nextUntil( '.hide_options_if_checked, .show_options_if_checked', '.hidden_option').hide();
187187
}
188188

189-
}).change();
189+
}).trigger('change');
190190

191191
});
192192

@@ -244,7 +244,7 @@
244244
$('div.a3_subsubsub_section ' + $(this).attr('href') ).show();
245245
}
246246
});
247-
$('div.a3_subsubsub_section ul.subsubsub li a').click(function(){
247+
$('div.a3_subsubsub_section ul.subsubsub li a').on( 'click', function(){
248248
var clicked = $(this);
249249
var section = clicked.closest('.a3_subsubsub_section');
250250
var target = clicked.attr('href');

admin/assets/js/chosen/chosen.ajaxify.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function chosen_ajaxify(id, ajax_url){
8686

8787
jQuery('div#' + div_id + '_chosen' + ' .chosen-search input').val(keyword);
8888
jQuery('div#' + div_id + '_chosen' + ' .chosen-search input').removeAttr('readonly');
89-
jQuery('div#' + div_id + '_chosen' + ' .chosen-search input').focus();
89+
jQuery('div#' + div_id + '_chosen' + ' .chosen-search input').trigger('focus');
9090
// emphasis keywords
9191
jQuery('div#' + div_id + '_chosen' + ' .active-result').each(function(){
9292
var html = jQuery(this).html();
@@ -153,7 +153,7 @@ function chosen_ajaxify(id, ajax_url){
153153
jQuery('div#' + div_id + '_chosen' + ' input').val(keyword);
154154
jQuery('div#' + div_id + '_chosen' + ' input').removeAttr('readonly');
155155
jQuery('div#' + div_id + '_chosen' + ' input').css('width', old_input_width);
156-
jQuery('div#' + div_id + '_chosen' + ' input').focus();
156+
jQuery('div#' + div_id + '_chosen' + ' input').trigger('focus');
157157
// put that underscores
158158
jQuery('div#' + div_id + '_chosen' + ' .active-result').each(function(){
159159
var html = jQuery(this).html();
@@ -169,7 +169,7 @@ function chosen_ajaxify(id, ajax_url){
169169

170170
function chosen_depend_on(id, id_depend_on, ajax_url){
171171
var OLD_VALUE = jQuery('#'+id_depend_on).val();
172-
jQuery('#'+id_depend_on).change(function(event){
172+
jQuery('#'+id_depend_on).on( 'change', function(event){
173173
var val = jQuery(this).val();
174174
if(val != OLD_VALUE){
175175
jQuery.ajax({

admin/assets/js/chosen/chosen.jquery.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ This file is generated by `grunt build`, do not edit it by hand.
916916
this.clear_backstroke();
917917
this.show_search_field_default();
918918
this.search_field_scale();
919-
return this.search_field.blur();
919+
return this.search_field.trigger('blur');
920920
};
921921

922922
Chosen.prototype.activate_field = function() {
@@ -926,7 +926,7 @@ This file is generated by `grunt build`, do not edit it by hand.
926926
this.container.addClass("chosen-container-active");
927927
this.active_field = true;
928928
this.search_field.val(this.search_field.val());
929-
return this.search_field.focus();
929+
return this.search_field.trigger('focus');
930930
};
931931

932932
Chosen.prototype.test_active_click = function(evt) {
@@ -999,7 +999,7 @@ This file is generated by `grunt build`, do not edit it by hand.
999999
}
10001000
this.container.addClass("chosen-with-drop");
10011001
this.results_showing = true;
1002-
this.search_field.focus();
1002+
this.search_field.trigger('focus');
10031003
this.search_field.val(this.get_search_field_value());
10041004
this.winnow_results();
10051005
return this.form_field_jq.trigger("chosen:showing_dropdown", {
@@ -1057,7 +1057,7 @@ This file is generated by `grunt build`, do not edit it by hand.
10571057
if (target.length) {
10581058
this.result_highlight = target;
10591059
this.result_select(evt);
1060-
return this.search_field.focus();
1060+
return this.search_field.trigger('focus');
10611061
}
10621062
};
10631063

@@ -1108,7 +1108,7 @@ This file is generated by `grunt build`, do not edit it by hand.
11081108
Chosen.prototype.choice_destroy = function(link) {
11091109
if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
11101110
if (this.active_field) {
1111-
this.search_field.focus();
1111+
this.search_field.trigger('focus');
11121112
} else {
11131113
this.show_search_field_default();
11141114
}

admin/assets/js/chosen/chosen.jquery.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

admin/assets/js/data-meta-boxes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ jQuery( function ( $ ) {
66
$(this).find('div.a3-metabox-panel').hide();
77
$(this).find('div.a3-metabox-panel').first().show();
88
});
9-
$('ul.a3-metabox-data-tabs a').click(function(){
9+
$('ul.a3-metabox-data-tabs a').on( 'click', function(){
1010
var panel_wrap = $(this).closest('div.a3-metabox-panel-wrap');
1111
$('ul.a3-metabox-data-tabs li', panel_wrap).removeClass('active');
1212
$(this).parent().addClass('active');
1313
$('div.a3-metabox-panel', panel_wrap).hide();
1414
$( $(this).attr('href') ).show();
1515
return false;
1616
});
17-
$('ul.a3-metabox-data-tabs li:visible').eq(0).find('a').click();
17+
$('ul.a3-metabox-data-tabs li:visible').eq(0).find('a').trigger('click');
1818

1919
// META BOXES - Open/close
2020
$('.a3-metabox-wrapper').on('click', '.a3-metabox-item h3', function(event){

admin/assets/js/datetimepicker/jquery.datetimepicker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@
15371537
if ([ENTER].indexOf(key) !== -1) {
15381538
elementSelector = $("input:visible,textarea:visible");
15391539
datetimepicker.trigger('close.xdsoft');
1540-
elementSelector.eq(elementSelector.index(this) + 1).focus();
1540+
elementSelector.eq(elementSelector.index(this) + 1).trigger('focus');
15411541
return false;
15421542
}
15431543
if ([TAB].indexOf(key) !== -1) {
@@ -1579,7 +1579,7 @@
15791579
if (typeof opt === 'string') {
15801580
switch (opt) {
15811581
case 'show':
1582-
$(this).select().focus();
1582+
$(this).trigger('select').trigger('focus');
15831583
datetimepicker.trigger('open.xdsoft');
15841584
break;
15851585
case 'hide':

admin/assets/js/iphone-style-checkboxes.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

admin/assets/js/iphone-style-checkboxes.rtl.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

admin/assets/js/rwdImageMaps/jquery.rwdImageMaps.min.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
* http://mattstow.com
99
* Licensed under the MIT license
1010
*/
11-
;(function(a){a.fn.rwdImageMaps=function(){var c=this;var b=function(){c.each(function(){if(typeof(a(this).attr("usemap"))=="undefined"){return}var e=this,d=a(e);a("<img />").on('load',function(){var g="width",m="height",n=d.attr(g),j=d.attr(m);if(!n||!j){var o=new Image();o.src=d.attr("src");if(!n){n=o.width}if(!j){j=o.height}}var f=d.width()/100,k=d.height()/100,i=d.attr("usemap").replace("#",""),l="coords";a('map[name="'+i+'"]').find("area").each(function(){var r=a(this);if(!r.data(l)){r.data(l,r.attr(l))}var q=r.data(l).split(","),p=new Array(q.length);for(var h=0;h<p.length;++h){if(h%2===0){p[h]=parseInt(((q[h]/n)*100)*f)}else{p[h]=parseInt(((q[h]/j)*100)*k)}}r.attr(l,p.toString())})}).attr("src",d.attr("src"))})};a(window).resize(b).trigger("resize");return this}})(jQuery);
11+
;(function(a){a.fn.rwdImageMaps=function(){var c=this;var b=function(){c.each(function(){if(typeof(a(this).attr("usemap"))=="undefined"){return}var e=this,d=a(e);a("<img />").on('load',function(){var g="width",m="height",n=d.attr(g),j=d.attr(m);if(!n||!j){var o=new Image();o.src=d.attr("src");if(!n){n=o.width}if(!j){j=o.height}}var f=d.width()/100,k=d.height()/100,i=d.attr("usemap").replace("#",""),l="coords";a('map[name="'+i+'"]').find("area").each(function(){var r=a(this);if(!r.data(l)){r.data(l,r.attr(l))}var q=r.data(l).split(","),p=new Array(q.length);for(var h=0;h<p.length;++h){if(h%2===0){p[h]=parseInt(((q[h]/n)*100)*f)}else{p[h]=parseInt(((q[h]/j)*100)*k)}}r.attr(l,p.toString())})}).attr("src",d.attr("src"))})};a(window).on('resize',b).trigger("resize");return this}})(jQuery);

0 commit comments

Comments
 (0)