Skip to content

Commit cb33114

Browse files
committed
Release new version 2.4.2
= 2.4.2 - 2020/12/08 = * This maintenance release has tweaks and bug fixes for compatibility with WordPress major version 5.6, PHP 7.4.8 and WooCommerce 4.7.1 * Tweak - Test and Tweak for compatibility with PHP 7.4.8 * Tweak - Test for compatibility with WordPress 5.6 * Tweak - Test for compatibility with WooCommerce 4.7.1 * Fix - Attached ajaxComplete to document instead of window * Fix - Replace old isFunction by typeof check function
1 parent 9deb7fc commit cb33114

File tree

6 files changed

+21
-26
lines changed

6 files changed

+21
-26
lines changed

a3-lazy-load.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
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.1
5+
Version: 2.4.2
66
Author: a3rev Software
77
Author URI: https://a3rev.com/
88
Requires at least: 4.9
9-
Tested up to: 5.5
9+
Tested up to: 5.6
1010
Text Domain: a3-lazy-load
1111
Domain Path: /languages
12-
WC requires at least: 2.0.0
13-
WC tested up to: 4.4
1412
License: GPLv2 or later
1513
Copyright © 2011 a3 Revolution Software Development team
1614
a3 Revolution Software Development team
@@ -33,7 +31,7 @@
3331

3432
define( 'A3_LAZY_LOAD_KEY', 'a3_lazy_load' );
3533
define( 'A3_LAZY_LOAD_PREFIX', 'a3_lazy_load_' );
36-
define( 'A3_LAZY_VERSION', '2.4.1' );
34+
define( 'A3_LAZY_VERSION', '2.4.2' );
3735
define( 'A3_LAZY_LOAD_G_FONTS', false );
3836

3937
use \A3Rev\LazyLoad\FrameWork;

admin/less/sass.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,8 @@ public function plugin_compile_less_mincss( $sass, $css_file_name = '' )
7575
global $wp_filesystem;
7676

7777
$_upload_dir = wp_upload_dir();
78-
$wp_filesystem->chmod($_upload_dir['basedir'], 0755);
7978
if (! $wp_filesystem->is_dir($_upload_dir['basedir'] . '/sass')) {
8079
$wp_filesystem->mkdir($_upload_dir['basedir'] . '/sass', 0755);
81-
} else {
82-
$wp_filesystem->chmod($_upload_dir['basedir'] . '/sass', 0755);
8380
}
8481

8582
if ( trim( $css_file_name ) == '' ) $css_file_name = $this->css_file_name;
@@ -105,16 +102,6 @@ public function plugin_compile_less_mincss( $sass, $css_file_name = '' )
105102
$wp_filesystem->copy($mixinsless, $a3rev_mixins_less, true );
106103
}
107104

108-
$files = array_diff(scandir($_upload_dir['basedir'] . '/sass'), array(
109-
'.',
110-
'..'
111-
));
112-
if ($files) {
113-
foreach ($files as $file) {
114-
$wp_filesystem->chmod($_upload_dir['basedir'] . '/sass/' . $file, 0644);
115-
}
116-
}
117-
118105
$sass_data = '';
119106

120107
if ($sass != '') {

assets/js/jquery.lazyloadxt.extend.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jQuery( document ).ready( function( $ ) {
1717
});
1818
});
1919

20-
jQuery(window).on('ajaxComplete', function() {
20+
jQuery(document).ajaxComplete( function() {
2121
setTimeout(function() {
2222
jQuery(window).lazyLoadXT();
2323
}, 1000 );

assets/js/jquery.lazyloadxt.extra.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
visibleOnly: true
4141
},
4242
$window = $(window),
43-
$isFunction = $.isFunction,
4443
$extend = $.extend,
4544
$data = $.data || function (el, name) {
4645
return $(el).data(name);
@@ -134,7 +133,7 @@
134133
function triggerEvent(event, $el) {
135134
var handler = options['on' + event];
136135
if (handler) {
137-
if ($isFunction(handler)) {
136+
if ( typeof handler === "function" ) {
138137
handler.call($el[0]);
139138
} else {
140139
if (handler.addClass) {
@@ -211,7 +210,7 @@
211210
triggerEvent('show', $el);
212211

213212
var srcAttr = objData.srcAttr,
214-
src = $isFunction(srcAttr) ? srcAttr($el) : el.getAttribute(srcAttr);
213+
src = typeof srcAttr === "function" ? srcAttr($el) : el.getAttribute(srcAttr);
215214

216215
if (src) {
217216
el.src = src;
@@ -320,7 +319,7 @@
320319

321320
$(document).on('lazyshow', 'video', function (e, $el) {
322321
var srcAttr = $el.lazyLoadXT.srcAttr,
323-
isFuncSrcAttr = $.isFunction(srcAttr),
322+
isFuncSrcAttr = ( typeof srcAttr === "function" ),
324323
changed = false;
325324

326325
$el.attr('poster', $el.attr(options.videoPoster));

assets/js/jquery.lazyloadxt.extra.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.

readme.txt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Contributors: a3rev, a3rev Software, nguyencongtuan
33
Tags: a3 lazy load, Lazy Loading, image lazy load, lazyload
44
Requires at least: 4.9
5-
Tested up to: 5.5.0
6-
Stable tag: 2.4.1
5+
Tested up to: 5.6
6+
Stable tag: 2.4.2
77
License: GPLv3
88
License URI: http://www.gnu.org/licenses/gpl-3.0.html
99

@@ -208,6 +208,14 @@ Filter tags to add to class name of theme to exclude lazy load on images or vide
208208

209209
== Changelog ==
210210

211+
= 2.4.2 - 2020/12/08 =
212+
* This maintenance release has tweaks and bug fixes for compatibility with WordPress major version 5.6, PHP 7.4.8 and WooCommerce 4.7.1
213+
* Tweak - Test and Tweak for compatibility with PHP 7.4.8
214+
* Tweak - Test for compatibility with WordPress 5.6
215+
* Tweak - Test for compatibility with WooCommerce 4.7.1
216+
* Fix - Attached ajaxComplete to document instead of window
217+
* Fix - Replace old isFunction by typeof check function
218+
211219
= 2.4.1 - 2020/08/17 =
212220
* This maintenance release resolves a conflict with jQuery helper plugin and WordPress 5.5
213221
* Fix - Update plugin framework script, remove jQuery.browser is deprecated to resolve conflict with jQuery Migrate Helper plugin
@@ -516,6 +524,9 @@ Filter tags to add to class name of theme to exclude lazy load on images or vide
516524

517525
== Upgrade Notice ==
518526

527+
= 2.4.2 =
528+
This maintenance release has tweaks and bug fixes for compatibility with WordPress major version 5.6, PHP 7.4.8 and WooCommerce 4.7.1
529+
519530
= 2.4.1 =
520531
This maintenance release resolves a conflict with jQuery helper plugin and WordPress 5.5
521532

0 commit comments

Comments
 (0)