a3 Lazy Load - Version 1.9.1

Version Description

This maintenance update resolves 2 issues from the v 1.9.0 upgrade

Download this release

Release Info

Developer a3rev
Plugin Icon 128x128 a3 Lazy Load
Version 1.9.1
Comparing to
See all releases

Code changes from version 1.9.0 to 1.9.1

a3-lazy-load.php CHANGED
@@ -2,7 +2,7 @@
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: 1.9.0
6
  Author: a3rev Software
7
  Author URI: https://a3rev.com/
8
  Requires at least: 4.0
@@ -32,7 +32,7 @@ define('A3_LAZY_LOAD_CSS_URL', A3_LAZY_LOAD_URL . '/assets/css');
32
  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_VERSION', '1.9.0' );
36
 
37
  /**
38
  * Load Localisation files.
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: 1.9.1
6
  Author: a3rev Software
7
  Author URI: https://a3rev.com/
8
  Requires at least: 4.0
32
  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_VERSION', '1.9.1' );
36
 
37
  /**
38
  * Load Localisation files.
assets/css/jquery.lazyloadxt.fadein.css CHANGED
@@ -2,11 +2,14 @@
2
  opacity: 0;
3
  background-color: #ffffff;
4
  }
 
 
 
5
  .lazy-loaded {
6
  -webkit-transition: opacity 0.3s;
7
  -moz-transition: opacity 0.3s;
8
  -ms-transition: opacity 0.3s;
9
  -o-transition: opacity 0.3s;
10
  transition: opacity 0.3s;
11
- opacity: 1;
12
  }
2
  opacity: 0;
3
  background-color: #ffffff;
4
  }
5
+ figure.wp-block-image img.lazy-hidden {
6
+ min-width: 150px;
7
+ }
8
  .lazy-loaded {
9
  -webkit-transition: opacity 0.3s;
10
  -moz-transition: opacity 0.3s;
11
  -ms-transition: opacity 0.3s;
12
  -o-transition: opacity 0.3s;
13
  transition: opacity 0.3s;
14
+ opacity: 1 !important;
15
  }
assets/css/jquery.lazyloadxt.spinner.css CHANGED
@@ -4,3 +4,6 @@
4
  background-repeat: no-repeat;
5
  background-position: 50% 50%;
6
  }
 
 
 
4
  background-repeat: no-repeat;
5
  background-position: 50% 50%;
6
  }
7
+ figure.wp-block-image img.lazy-hidden {
8
+ min-width: 150px;
9
+ }
assets/js/jquery.lazyloadxt.extra.js CHANGED
@@ -226,7 +226,7 @@
226
  }
227
 
228
  if (removeNode) {
229
- $data(el, dataLazied, 0);
230
  elements.splice(i--, 1);
231
  length--;
232
  }
226
  }
227
 
228
  if (removeNode) {
229
+ //$data(el, dataLazied, 0);
230
  elements.splice(i--, 1);
231
  length--;
232
  }
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),E=m.isFunction,d=m.extend,T=m.data||function(e,t){return m(e).data(t)},L=[],I=0,r=0;function c(e,t){return e[t]===o?b[t]:e[t]}function X(){var e=y.pageYOffset;return e===o?C.scrollTop:e}function B(e,t){var o=b["on"+e];o&&(E(o)?o.call(t[0]):(o.addClass&&t.addClass(o.addClass),o.removeClass&&t.removeClass(o.removeClass))),t.trigger("lazy"+e,[t]),u()}function k(e){B(e.type,m(this).off(z,k))}function i(e){if(L.length){e=e||b.forceLoad,I=1/0;var t,o,n=X(),a=y.innerHeight||C.clientHeight,r=y.innerWidth||C.clientWidth;for(t=0,o=L.length;t<o;t++){var i,s=L[t],l=s[0],d=s[p],c=!1,u=e||T(l,w)<0;if(m.contains(C,l)){if(e||!d.visibleOnly||l.offsetWidth||l.offsetHeight){if(!u){var f=l.getBoundingClientRect(),h=d.edgeX,v=d.edgeY;u=(i=f.top+n-v-a)<=n&&f.bottom>-v&&f.left<=r+h&&f.right>-h}if(u){s.on(z,k),B("show",s);var A=d.srcAttr,g=E(A)?A(s):l.getAttribute(A);g&&(l.src=g),c=!0}else i<I&&(I=i)}}else c=!0;c&&(T(l,w,0),L.splice(t--,1),o--)}o||B("complete",m(C))}}function s(){1<r?(r=1,i(),setTimeout(s,b.throttle)):r=0}function u(e){L.length&&(e&&"scroll"===e.type&&e.currentTarget===y&&I>=X()||(r||setTimeout(s,0),r=2))}function l(){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"),s=c(a,"show"),l={};for(e in m(t).on("scroll",u),n)l[e]=c(a,e);return this.each(function(e,t){if(t===y)m(b.selector).lazyLoadXT(a);else{var o=i&&T(t,w),n=m(t).data(w,s?-1:1);if(o)return void u();r&&"IMG"===t.tagName&&!t.src&&(t.src=r),n[p]=d({},l),B("init",n),L.push(n),u()}})},m(e).ready(function(){B("start",a),a.on(b.updateEvent,u).on(b.forceEvent,f),m(e).on(b.updateEvent,u),b.autoInit&&(a.on(b.loadEvent,l),l())})}(window.jQuery||window.Zepto||window.$,window,document),function(s){var o=s.lazyLoadXT;o.selector+=",video,iframe[data-src],embed[data-src]",o.videoPoster="data-poster",s(document).on("lazyshow","video",function(e,t){var a=t.lazyLoadXT.srcAttr,r=s.isFunction(a),i=!1;t.attr("poster",t.attr(o.videoPoster)),t.children("source,track").each(function(e,t){var o=s(t),n=r?a(o):o.attr(a);n&&(o.attr("src",n),i=!0)}),i&&void 0!==s(this).attr("preload")&&"none"!=s(this).attr("preload")&&this.load(),s(this).removeClass("lazy-hidden")}),s(document).on("lazyshow","embed",function(e,t){s(this).removeClass("lazy-hidden")})}(window.jQuery||window.Zepto||window.$);
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),E=m.isFunction,d=m.extend,T=m.data||function(e,t){return m(e).data(t)},L=[],I=0,r=0;function c(e,t){return e[t]===o?b[t]:e[t]}function X(){var e=y.pageYOffset;return e===o?C.scrollTop:e}function B(e,t){var o=b["on"+e];o&&(E(o)?o.call(t[0]):(o.addClass&&t.addClass(o.addClass),o.removeClass&&t.removeClass(o.removeClass))),t.trigger("lazy"+e,[t]),u()}function k(e){B(e.type,m(this).off(z,k))}function i(e){if(L.length){e=e||b.forceLoad,I=1/0;var t,o,n=X(),a=y.innerHeight||C.clientHeight,r=y.innerWidth||C.clientWidth;for(t=0,o=L.length;t<o;t++){var i,s=L[t],l=s[0],d=s[p],c=!1,u=e||T(l,w)<0;if(m.contains(C,l)){if(e||!d.visibleOnly||l.offsetWidth||l.offsetHeight){if(!u){var f=l.getBoundingClientRect(),h=d.edgeX,v=d.edgeY;u=(i=f.top+n-v-a)<=n&&f.bottom>-v&&f.left<=r+h&&f.right>-h}if(u){s.on(z,k),B("show",s);var A=d.srcAttr,g=E(A)?A(s):l.getAttribute(A);g&&(l.src=g),c=!0}else i<I&&(I=i)}}else c=!0;c&&(L.splice(t--,1),o--)}o||B("complete",m(C))}}function s(){1<r?(r=1,i(),setTimeout(s,b.throttle)):r=0}function u(e){L.length&&(e&&"scroll"===e.type&&e.currentTarget===y&&I>=X()||(r||setTimeout(s,0),r=2))}function l(){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"),s=c(a,"show"),l={};for(e in m(t).on("scroll",u),n)l[e]=c(a,e);return this.each(function(e,t){if(t===y)m(b.selector).lazyLoadXT(a);else{var o=i&&T(t,w),n=m(t).data(w,s?-1:1);if(o)return void u();r&&"IMG"===t.tagName&&!t.src&&(t.src=r),n[p]=d({},l),B("init",n),L.push(n),u()}})},m(e).ready(function(){B("start",a),a.on(b.updateEvent,u).on(b.forceEvent,f),m(e).on(b.updateEvent,u),b.autoInit&&(a.on(b.loadEvent,l),l())})}(window.jQuery||window.Zepto||window.$,window,document),function(s){var o=s.lazyLoadXT;o.selector+=",video,iframe[data-src],embed[data-src]",o.videoPoster="data-poster",s(document).on("lazyshow","video",function(e,t){var a=t.lazyLoadXT.srcAttr,r=s.isFunction(a),i=!1;t.attr("poster",t.attr(o.videoPoster)),t.children("source,track").each(function(e,t){var o=s(t),n=r?a(o):o.attr(a);n&&(o.attr("src",n),i=!0)}),i&&void 0!==s(this).attr("preload")&&"none"!=s(this).attr("preload")&&this.load(),s(this).removeClass("lazy-hidden")}),s(document).on("lazyshow","embed",function(e,t){s(this).removeClass("lazy-hidden")})}(window.jQuery||window.Zepto||window.$);
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: a3rev, a3rev Software, nguyencongtuan
3
  Tags: a3 lazy load, Lazy Loading , image lazy load, lazyload
4
  Requires at least: 4.5
5
  Tested up to: 4.9.8
6
- Stable tag: 1.9.0
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -194,6 +194,11 @@ Filter tags to add to class name of theme to exclude lazy load on images or vide
194
 
195
  == Changelog ==
196
 
 
 
 
 
 
197
  = 1.9.0 - 2018/08/06 =
198
  * This feature upgrade is focused on adding a number of new options for excluding Lazy Load from sections of a site. Compatibility with WordPress 4.9.8, Gutenberg 3.4.0 and WooCommerce 3.4.4
199
  * Feature - Add exclude from Lazy Load by URI
@@ -401,6 +406,9 @@ Filter tags to add to class name of theme to exclude lazy load on images or vide
401
 
402
  == Upgrade Notice ==
403
 
 
 
 
404
  = 1.9.0 =
405
  This feature upgrade is focused on adding a number of new options for excluding Lazy Load from sections of a site plus Compatibility with WordPress 4.9.8, Gutenberg 3.4.0 and WooCommerce 3.4.4
406
 
3
  Tags: a3 lazy load, Lazy Loading , image lazy load, lazyload
4
  Requires at least: 4.5
5
  Tested up to: 4.9.8
6
+ Stable tag: 1.9.1
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
194
 
195
  == Changelog ==
196
 
197
+ = 1.9.1 - 2018/08/10 =
198
+ * This maintenance update resolves 2 issues from the v 1.9.0 upgrade
199
+ * Fix - Set min-width of placeholder to resolve any image tag that does not have width or height not showing the spinner effect. Example Gutenberg image block.
200
+ * Fix - Update Lazy Load extra script to resolve duplicated call time for images, iframe, videos on viewport
201
+
202
  = 1.9.0 - 2018/08/06 =
203
  * This feature upgrade is focused on adding a number of new options for excluding Lazy Load from sections of a site. Compatibility with WordPress 4.9.8, Gutenberg 3.4.0 and WooCommerce 3.4.4
204
  * Feature - Add exclude from Lazy Load by URI
406
 
407
  == Upgrade Notice ==
408
 
409
+ = 1.9.1 =
410
+ This maintenance update resolves 2 issues from the v 1.9.0 upgrade
411
+
412
  = 1.9.0 =
413
  This feature upgrade is focused on adding a number of new options for excluding Lazy Load from sections of a site plus Compatibility with WordPress 4.9.8, Gutenberg 3.4.0 and WooCommerce 3.4.4
414