Version Description
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
Download this release
Release Info
Developer | a3rev |
Plugin | a3 Lazy Load |
Version | 2.4.2 |
Comparing to | |
See all releases |
Code changes from version 2.4.1 to 2.4.2
- a3-lazy-load.php +3 -5
- admin/less/sass.php +0 -13
- assets/js/jquery.lazyloadxt.extend.js +1 -1
- assets/js/jquery.lazyloadxt.extra.js +3 -4
- assets/js/jquery.lazyloadxt.extra.min.js +1 -1
- readme.txt +13 -2
a3-lazy-load.php
CHANGED
@@ -2,15 +2,13 @@
|
|
2 |
/*
|
3 |
Plugin Name: a3 Lazy Load
|
4 |
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.
|
6 |
Author: a3rev Software
|
7 |
Author URI: https://a3rev.com/
|
8 |
Requires at least: 4.9
|
9 |
-
Tested up to: 5.
|
10 |
Text Domain: a3-lazy-load
|
11 |
Domain Path: /languages
|
12 |
-
WC requires at least: 2.0.0
|
13 |
-
WC tested up to: 4.4
|
14 |
License: GPLv2 or later
|
15 |
Copyright © 2011 a3 Revolution Software Development team
|
16 |
a3 Revolution Software Development team
|
@@ -33,7 +31,7 @@ define('A3_LAZY_LOAD_IMAGES_URL', A3_LAZY_LOAD_URL . '/assets/images');
|
|
33 |
|
34 |
define( 'A3_LAZY_LOAD_KEY', 'a3_lazy_load' );
|
35 |
define( 'A3_LAZY_LOAD_PREFIX', 'a3_lazy_load_' );
|
36 |
-
define( 'A3_LAZY_VERSION', '2.4.
|
37 |
define( 'A3_LAZY_LOAD_G_FONTS', false );
|
38 |
|
39 |
use \A3Rev\LazyLoad\FrameWork;
|
2 |
/*
|
3 |
Plugin Name: a3 Lazy Load
|
4 |
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.2
|
6 |
Author: a3rev Software
|
7 |
Author URI: https://a3rev.com/
|
8 |
Requires at least: 4.9
|
9 |
+
Tested up to: 5.6
|
10 |
Text Domain: a3-lazy-load
|
11 |
Domain Path: /languages
|
|
|
|
|
12 |
License: GPLv2 or later
|
13 |
Copyright © 2011 a3 Revolution Software Development team
|
14 |
a3 Revolution Software Development team
|
31 |
|
32 |
define( 'A3_LAZY_LOAD_KEY', 'a3_lazy_load' );
|
33 |
define( 'A3_LAZY_LOAD_PREFIX', 'a3_lazy_load_' );
|
34 |
+
define( 'A3_LAZY_VERSION', '2.4.2' );
|
35 |
define( 'A3_LAZY_LOAD_G_FONTS', false );
|
36 |
|
37 |
use \A3Rev\LazyLoad\FrameWork;
|
admin/less/sass.php
CHANGED
@@ -75,11 +75,8 @@ class Less_Sass
|
|
75 |
global $wp_filesystem;
|
76 |
|
77 |
$_upload_dir = wp_upload_dir();
|
78 |
-
$wp_filesystem->chmod($_upload_dir['basedir'], 0755);
|
79 |
if (! $wp_filesystem->is_dir($_upload_dir['basedir'] . '/sass')) {
|
80 |
$wp_filesystem->mkdir($_upload_dir['basedir'] . '/sass', 0755);
|
81 |
-
} else {
|
82 |
-
$wp_filesystem->chmod($_upload_dir['basedir'] . '/sass', 0755);
|
83 |
}
|
84 |
|
85 |
if ( trim( $css_file_name ) == '' ) $css_file_name = $this->css_file_name;
|
@@ -105,16 +102,6 @@ class Less_Sass
|
|
105 |
$wp_filesystem->copy($mixinsless, $a3rev_mixins_less, true );
|
106 |
}
|
107 |
|
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 |
-
|
118 |
$sass_data = '';
|
119 |
|
120 |
if ($sass != '') {
|
75 |
global $wp_filesystem;
|
76 |
|
77 |
$_upload_dir = wp_upload_dir();
|
|
|
78 |
if (! $wp_filesystem->is_dir($_upload_dir['basedir'] . '/sass')) {
|
79 |
$wp_filesystem->mkdir($_upload_dir['basedir'] . '/sass', 0755);
|
|
|
|
|
80 |
}
|
81 |
|
82 |
if ( trim( $css_file_name ) == '' ) $css_file_name = $this->css_file_name;
|
102 |
$wp_filesystem->copy($mixinsless, $a3rev_mixins_less, true );
|
103 |
}
|
104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
$sass_data = '';
|
106 |
|
107 |
if ($sass != '') {
|
assets/js/jquery.lazyloadxt.extend.js
CHANGED
@@ -17,7 +17,7 @@ jQuery( document ).ready( function( $ ) {
|
|
17 |
});
|
18 |
});
|
19 |
|
20 |
-
jQuery(
|
21 |
setTimeout(function() {
|
22 |
jQuery(window).lazyLoadXT();
|
23 |
}, 1000 );
|
17 |
});
|
18 |
});
|
19 |
|
20 |
+
jQuery(document).ajaxComplete( function() {
|
21 |
setTimeout(function() {
|
22 |
jQuery(window).lazyLoadXT();
|
23 |
}, 1000 );
|
assets/js/jquery.lazyloadxt.extra.js
CHANGED
@@ -40,7 +40,6 @@
|
|
40 |
visibleOnly: true
|
41 |
},
|
42 |
$window = $(window),
|
43 |
-
$isFunction = $.isFunction,
|
44 |
$extend = $.extend,
|
45 |
$data = $.data || function (el, name) {
|
46 |
return $(el).data(name);
|
@@ -134,7 +133,7 @@
|
|
134 |
function triggerEvent(event, $el) {
|
135 |
var handler = options['on' + event];
|
136 |
if (handler) {
|
137 |
-
if (
|
138 |
handler.call($el[0]);
|
139 |
} else {
|
140 |
if (handler.addClass) {
|
@@ -211,7 +210,7 @@
|
|
211 |
triggerEvent('show', $el);
|
212 |
|
213 |
var srcAttr = objData.srcAttr,
|
214 |
-
src =
|
215 |
|
216 |
if (src) {
|
217 |
el.src = src;
|
@@ -320,7 +319,7 @@
|
|
320 |
|
321 |
$(document).on('lazyshow', 'video', function (e, $el) {
|
322 |
var srcAttr = $el.lazyLoadXT.srcAttr,
|
323 |
-
isFuncSrcAttr =
|
324 |
changed = false;
|
325 |
|
326 |
$el.attr('poster', $el.attr(options.videoPoster));
|
40 |
visibleOnly: true
|
41 |
},
|
42 |
$window = $(window),
|
|
|
43 |
$extend = $.extend,
|
44 |
$data = $.data || function (el, name) {
|
45 |
return $(el).data(name);
|
133 |
function triggerEvent(event, $el) {
|
134 |
var handler = options['on' + event];
|
135 |
if (handler) {
|
136 |
+
if ( typeof handler === "function" ) {
|
137 |
handler.call($el[0]);
|
138 |
} else {
|
139 |
if (handler.addClass) {
|
210 |
triggerEvent('show', $el);
|
211 |
|
212 |
var srcAttr = objData.srcAttr,
|
213 |
+
src = typeof srcAttr === "function" ? srcAttr($el) : el.getAttribute(srcAttr);
|
214 |
|
215 |
if (src) {
|
216 |
el.src = src;
|
319 |
|
320 |
$(document).on('lazyshow', 'video', function (e, $el) {
|
321 |
var srcAttr = $el.lazyLoadXT.srcAttr,
|
322 |
+
isFuncSrcAttr = ( typeof srcAttr === "function" ),
|
323 |
changed = false;
|
324 |
|
325 |
$el.attr('poster', $el.attr(options.videoPoster));
|
assets/js/jquery.lazyloadxt.extra.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
/* Lazy Load XT 1.1.0 | MIT License */
|
2 |
-
!function(m,y,e,o){var p="lazyLoadXT",w="lazied",z="load error",t="lazy-hidden",C=e.documentElement||e.body,b={autoInit:!0,selector:"img[data-src]",blankImage:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",throttle:99,forceLoad:y.onscroll===o||!!y.operamini||!C.getBoundingClientRect,loadEvent:"pageshow",updateEvent:"load orientationchange resize scroll touchmove focus",forceEvent:"lazyloadall",oninit:{removeClass:"lazy"},onshow:{addClass:t},onload:{removeClass:t,addClass:"lazy-loaded"},onerror:{removeClass:t},checkDuplicates:!0},n={srcAttr:"data-src",edgeX:0,edgeY:0,visibleOnly:!0},a=m(y),
|
1 |
/* Lazy Load XT 1.1.0 | MIT License */
|
2 |
+
!function(m,y,e,o){var p="lazyLoadXT",w="lazied",z="load error",t="lazy-hidden",C=e.documentElement||e.body,b={autoInit:!0,selector:"img[data-src]",blankImage:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",throttle:99,forceLoad:y.onscroll===o||!!y.operamini||!C.getBoundingClientRect,loadEvent:"pageshow",updateEvent:"load orientationchange resize scroll touchmove focus",forceEvent:"lazyloadall",oninit:{removeClass:"lazy"},onshow:{addClass:t},onload:{removeClass:t,addClass:"lazy-loaded"},onerror:{removeClass:t},checkDuplicates:!0},n={srcAttr:"data-src",edgeX:0,edgeY:0,visibleOnly:!0},a=m(y),d=m.extend,E=m.data||function(e,t){return m(e).data(t)},T=[],L=0,r=0;function c(e,t){return e[t]===o?b[t]:e[t]}function I(){var e=y.pageYOffset;return e===o?C.scrollTop:e}function X(e,t){var o=b["on"+e];o&&("function"==typeof o?o.call(t[0]):(o.addClass&&t.addClass(o.addClass),o.removeClass&&t.removeClass(o.removeClass))),t.trigger("lazy"+e,[t]),u()}function B(e){X(e.type,m(this).off(z,B))}function i(e){if(T.length){e=e||b.forceLoad,L=1/0;for(var t=I(),o=y.innerHeight||C.clientHeight,n=y.innerWidth||C.clientWidth,a=0,r=T.length;a<r;a++){var i,l,s,d,c,u,f=T[a],h=f[0],v=f[p],A=!1,g=e||E(h,w)<0;m.contains(C,h)?(e||!v.visibleOnly||h.offsetWidth||h.offsetHeight)&&(g||(i=h.getBoundingClientRect(),l=v.edgeX,s=v.edgeY,g=(d=i.top+t-s-o)<=t&&i.bottom>-s&&i.left<=n+l&&i.right>-l),g?(f.on(z,B),X("show",f),(u="function"==typeof(c=v.srcAttr)?c(f):h.getAttribute(c))&&(h.src=u),A=!0):d<L&&(L=d)):A=!0,A&&(T.splice(a--,1),r--)}r||X("complete",m(C))}}function l(){1<r?(r=1,i(),setTimeout(l,b.throttle)):r=0}function u(e){T.length&&(e&&"scroll"===e.type&&e.currentTarget===y&&L>=I()||(r||setTimeout(l,0),r=2))}function s(){a.lazyLoadXT()}function f(){i(!0)}m[p]=d(b,n,m[p]),m.fn[p]=function(a){var e,r=c(a=a||{},"blankImage"),i=c(a,"checkDuplicates"),t=c(a,"scrollContainer"),l=c(a,"show"),s={};for(e in m(t).on("scroll",u),n)s[e]=c(a,e);return this.each(function(e,t){if(t===y)m(b.selector).lazyLoadXT(a);else{var o=i&&E(t,w),n=m(t).data(w,l?-1:1);if(o)return void u();r&&"IMG"===t.tagName&&!t.src&&(t.src=r),n[p]=d({},s),X("init",n),T.push(n),u()}})},m(e).ready(function(){X("start",a),a.on(b.updateEvent,u).on(b.forceEvent,f),m(e).on(b.updateEvent,u),b.autoInit&&(a.on(b.loadEvent,s),s())})}(window.jQuery||window.Zepto||window.$,window,document),function(l){var o=l.lazyLoadXT;o.selector+=",video,iframe[data-src],embed[data-src]",o.videoPoster="data-poster",l(document).on("lazyshow","video",function(e,t){var a=t.lazyLoadXT.srcAttr,r="function"==typeof a,i=!1;t.attr("poster",t.attr(o.videoPoster)),t.children("source,track").each(function(e,t){var o=l(t),n=r?a(o):o.attr(a);n&&(o.attr("src",n),i=!0)}),i&&void 0!==l(this).attr("preload")&&"none"!=l(this).attr("preload")&&this.load(),l(this).removeClass("lazy-hidden")}),l(document).on("lazyshow","embed",function(e,t){l(this).removeClass("lazy-hidden")})}(window.jQuery||window.Zepto||window.$);
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: a3rev, a3rev Software, nguyencongtuan
|
3 |
Tags: a3 lazy load, Lazy Loading, image lazy load, lazyload
|
4 |
Requires at least: 4.9
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 2.4.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -208,6 +208,14 @@ Filter tags to add to class name of theme to exclude lazy load on images or vide
|
|
208 |
|
209 |
== Changelog ==
|
210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
= 2.4.1 - 2020/08/17 =
|
212 |
* This maintenance release resolves a conflict with jQuery helper plugin and WordPress 5.5
|
213 |
* 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
|
|
516 |
|
517 |
== Upgrade Notice ==
|
518 |
|
|
|
|
|
|
|
519 |
= 2.4.1 =
|
520 |
This maintenance release resolves a conflict with jQuery helper plugin and WordPress 5.5
|
521 |
|
2 |
Contributors: a3rev, a3rev Software, nguyencongtuan
|
3 |
Tags: a3 lazy load, Lazy Loading, image lazy load, lazyload
|
4 |
Requires at least: 4.9
|
5 |
+
Tested up to: 5.6
|
6 |
+
Stable tag: 2.4.2
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
208 |
|
209 |
== Changelog ==
|
210 |
|
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 |
+
|
219 |
= 2.4.1 - 2020/08/17 =
|
220 |
* This maintenance release resolves a conflict with jQuery helper plugin and WordPress 5.5
|
221 |
* Fix - Update plugin framework script, remove jQuery.browser is deprecated to resolve conflict with jQuery Migrate Helper plugin
|
524 |
|
525 |
== Upgrade Notice ==
|
526 |
|
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 |
+
|
530 |
= 2.4.1 =
|
531 |
This maintenance release resolves a conflict with jQuery helper plugin and WordPress 5.5
|
532 |
|