Skip to content

Commit 4952797

Browse files
committed
Release new version 2.4.6
= 2.4.6 - 2020/12/30 = * This is an important maintenance release that updates our scripts for compatibility with the latest version of jQuery released in WordPress 5.6 * Tweak - Update JavaScript on plugin framework for work compatibility with latest version of jQuery * Fix - Replace .bind( event, handler ) by .on( event, handler ) for compatibility with latest version of jQuery * Fix - Replace :eq() Selector by .eq() for compatibility with latest version of jQuery * Fix - Replace .error() by .on( “error” ) for compatibility with latest version of jQuery * Fix - Replace :first Selector by .first() for compatibility with latest version of jQuery * Fix - Replace :gt(0) Selector by .slice(1) for compatibility with latest version of jQuery * Fix - Remove jQuery.browser for compatibility with latest version of jQuery * Fix - Replace jQuery.isArray() by Array.isArray() for compatibility with latest version of jQuery * Fix - Replace jQuery.isFunction(x) by typeof x === “function” for compatibility with latest version of jQuery * Fix - Replace jQuery.isNumeric(x) by typeof x === “number” for compatibility with latest version of jQuery * Fix - Replace jQuery.now() by Date.now() for compatibility with latest version of jQuery * Fix - Replace jQuery.parseJSON() by JSON.parse() for compatibility with latest version of jQuery * Fix - Remove jQuery.support for compatibility with latest version of jQuery * Fix - Replace jQuery.trim(x) by x.trim() for compatibility with latest version of jQuery * Fix - Replace jQuery.type(x) by typeof x for compatibility with latest version of jQuery * Fix - Replace .load( handler ) by .on( “load”, handler ) for compatibility with latest version of jQuery * Fix - Replace .size() by .length for compatibility with latest version of jQuery * Fix - Replace .unbind( event ) by .off( event ) for compatibility with latest version of jQuery * Fix - Replace .unload( handler ) by .on( “unload”, handler ) for compatibility with latest version of jQuery
1 parent 2bfd0dd commit 4952797

18 files changed

+736
-478
lines changed

admin/admin-ui.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Admin_UI
3333
* You must change to correct plugin name that you are working
3434
*/
3535

36-
public $framework_version = '2.3.0';
36+
public $framework_version = '2.4.0';
3737
public $plugin_name = A3_PVC_KEY;
3838
public $plugin_path = A3_PVC_PLUGIN_NAME;
3939
public $google_api_key_option = '';

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
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).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();
@@ -178,7 +178,7 @@
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).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();
@@ -234,9 +234,9 @@
234234
});
235235

236236
/* Apply Sub tab selected script */
237-
$('div.a3_subsubsub_section ul.subsubsub li a:eq(0)').addClass('current');
238-
$('div.a3_subsubsub_section .section:gt(0)').hide();
239-
$('div.a3_subsubsub_section ul.subsubsub li a:gt(0)').each(function(){
237+
$('div.a3_subsubsub_section ul.subsubsub li a').eq(0).addClass('current');
238+
$('div.a3_subsubsub_section .section').slice(1).hide();
239+
$('div.a3_subsubsub_section ul.subsubsub li a').slice(1).each(function(){
240240
if( $(this).attr('class') == 'current') {
241241
$('div.a3_subsubsub_section ul.subsubsub li a').removeClass('current');
242242
$(this).addClass('current');
@@ -251,7 +251,7 @@
251251

252252
section.find('a').removeClass('current');
253253

254-
if ( section.find('.section:visible').size() > 0 ) {
254+
if ( section.find('.section:visible').length > 0 ) {
255255
section.find('.section:visible').fadeOut( 100, function() {
256256
section.find( target ).fadeIn('fast');
257257
});
@@ -336,7 +336,7 @@
336336
version_checking_status.css('display', 'none');
337337

338338
// Get response
339-
data = $.parseJSON( response );
339+
data = JSON.parse( response );
340340
if ( 0 == data.has_new_version ) {
341341
version_message_container.removeClass('a3rev-ui-new-version-message');
342342
version_message_container.addClass('a3rev-ui-latest-version-message');
@@ -417,7 +417,7 @@
417417
url: submit_data.ajax_url,
418418
data: submit_data.data,
419419
success: function ( response ) {
420-
data = $.parseJSON( response );
420+
data = JSON.parse( response );
421421
$('#' + bt_ajax_submit.attr('id') ).trigger("a3rev-ui-ajax_submit-completed", [ bt_ajax_submit, data ]);
422422

423423
setTimeout( function() {
@@ -522,7 +522,7 @@
522522
url: submit_data.ajax_url,
523523
data: submit_data.data,
524524
success: function ( response ) {
525-
result = $.parseJSON( response );
525+
result = JSON.parse( response );
526526

527527
new_items = result.current_items;
528528

admin/assets/js/chosen/chosen-sprite.png

100644100755
-108 Bytes
Loading

admin/assets/js/chosen/chosen-sprite@2x.png

100644100755
-134 Bytes
Loading

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
$.fn.bindWithDelay = function( type, data, fn, timeout, throttle ) {
44

5-
if ( $.isFunction( data ) ) {
5+
if ( typeof data === "function" ) {
66
throttle = timeout;
77
timeout = fn;
88
fn = data;
@@ -31,7 +31,7 @@
3131

3232
cb.guid = fn.guid;
3333

34-
$(this).bind(type, data, cb);
34+
$(this).on(type, data, cb);
3535
});
3636
};
3737

0 commit comments

Comments
 (0)