Skip to content

Commit 660fa80

Browse files
committed
Release new version 2.3.0
= 2.3.0 - 2020/02/25 = * This feature release adds support for horizontal scroll images plus a bug fix for compatibility with Revolution Slider * Feature - Add support for lazy loading images in a container that have horizontal scroll * Feature - Add Horizontal Scroll section to the Lazy Load Images option box on the admin panel * Feature - Apply Horizontal Scroll lazy load to any container by classname or ID * Fix - Compatibility with Revolution slider. Their JS has changed in a resent update causing a conflict which meant that the slider images did not show with a3 Lazy Load activated.
1 parent bb167f6 commit 660fa80

File tree

5 files changed

+59
-20
lines changed

5 files changed

+59
-20
lines changed

a3-lazy-load.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
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.2.2
5+
Version: 2.3.0
66
Author: a3rev Software
77
Author URI: https://a3rev.com/
88
Requires at least: 4.9
99
Tested up to: 5.3.2
1010
Text Domain: a3-lazy-load
1111
Domain Path: /languages
1212
WC requires at least: 2.0.0
13-
WC tested up to: 3.8.1
13+
WC tested up to: 3.9.2
1414
License: GPLv2 or later
1515
Copyright © 2011 a3 Revolution Software Development team
1616
a3 Revolution Software Development team
@@ -33,7 +33,7 @@
3333

3434
define( 'A3_LAZY_LOAD_KEY', 'a3_lazy_load' );
3535
define( 'A3_LAZY_LOAD_PREFIX', 'a3_lazy_load_' );
36-
define( 'A3_LAZY_VERSION', '2.2.2' );
36+
define( 'A3_LAZY_VERSION', '2.3.0' );
3737
define( 'A3_LAZY_LOAD_G_FONTS', false );
3838

3939
use \A3Rev\LazyLoad\FrameWork;

admin/settings/template-settings/global-settings.php

+13
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,19 @@ public function init_form_fields() {
338338
'type' => 'text',
339339
'default' => ""
340340
),
341+
array(
342+
'name' => __( 'Horizontal Scroll', 'a3-lazy-load' ),
343+
'type' => 'heading',
344+
'class' => 'a3l_apply_to_load_images_container',
345+
'desc' => __( 'a3 Lazy Load has built in support for Horizontal Scrolling image galleries BUT you must enter the container classname or ID below for it to apply to that horizontal scroll container. Use your code inspector to get the correct classname or ID, it will have style is <code>overflow-x:scroll</code>', 'a3-lazy-load' )
346+
),
347+
array(
348+
'name' => __( 'Container Classnames or IDs', 'a3-lazy-load' ),
349+
'id' => 'a3l_horizontal_trigger_classnames',
350+
'desc' => __('Prepend Classnames with a dot example <code>.images_holder</code>, Prepend IDs with hash tag example <code>#wrapper</code> and Comma separate if more than one.', 'a3-lazy-load' ),
351+
'type' => 'text',
352+
'default' => ""
353+
),
341354

342355

343356
array(

assets/js/jquery.lazyloadxt.extend.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
jQuery.lazyLoadXT.updateEvent = 'load orientationchange resize scroll touchmove focus click customlazyloadxtevent';
22
jQuery.lazyLoadXT.edgeY = a3_lazyload_extend_params.edgeY;
33
jQuery.lazyLoadXT.srcsetExtended = false;
4+
if ( typeof a3_lazyload_extend_params.horizontal_container_classnames !== 'undefined' && '' !== a3_lazyload_extend_params.horizontal_container_classnames ) {
5+
jQuery.lazyLoadXT.scrollContainer = a3_lazyload_extend_params.horizontal_container_classnames;
6+
}
47

58
jQuery( document ).ready( function( $ ) {
69
jQuery(document).on( 'mouseenter', '.site-header-cart', function() {

classes/class-a3-lazy-load.php

+16-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ function __construct() {
7575
$this->_skip_images_classes = array( 'skip-lazy', 'a3-notlazy' );
7676
}
7777

78+
// Fix the confliction with Rev Slider
79+
$this->_skip_images_classes = array_merge( array( 'rev-slidebg' ), $this->_skip_images_classes );
80+
7881
if ( $a3_lazy_load_global_settings['a3l_apply_to_images'] == true ) {
7982
add_filter( 'a3_lazy_load_images', array( $this, 'filter_images' ), 10, 2 );
8083

@@ -110,6 +113,9 @@ function __construct() {
110113
$this->_skip_videos_classes = array( 'skip-lazy', 'a3-notlazy', 'wp-video-shortcode' );
111114
}
112115

116+
// Fix the confliction with Rev Slider
117+
$this->_skip_videos_classes = array_merge( array( 'rev-slidebg' ), $this->_skip_videos_classes );
118+
113119
if ( $a3_lazy_load_global_settings['a3l_apply_to_videos'] == true ) {
114120
add_filter( 'a3_lazy_load_videos', array( $this, 'filter_videos' ), 10, 2 );
115121

@@ -198,8 +204,17 @@ static function localize_printed_scripts() {
198204
}
199205

200206
if ( wp_script_is( 'jquery-lazyloadxt-extend' ) ) {
207+
$horizontal_container_classnames = '';
208+
if ( ! empty( $a3_lazy_load_global_settings['a3l_horizontal_trigger_classnames'] ) ) {
209+
$horizontal_trigger_classnames = explode(',', $a3_lazy_load_global_settings['a3l_horizontal_trigger_classnames'] );
210+
$horizontal_trigger_classnames = array_map( 'trim', $horizontal_trigger_classnames );
211+
$horizontal_trigger_classnames = array_filter( $horizontal_trigger_classnames );
212+
$horizontal_container_classnames = implode(',', $horizontal_trigger_classnames );
213+
}
214+
201215
wp_localize_script( 'jquery-lazyloadxt-extend', 'a3_lazyload_extend_params', apply_filters( 'a3_lazyload_extend_params', array(
202-
'edgeY' => (int) $a3_lazy_load_global_settings['a3l_edgeY'],
216+
'edgeY' => (int) $a3_lazy_load_global_settings['a3l_edgeY'],
217+
'horizontal_container_classnames' => $horizontal_container_classnames
203218
) ) );
204219
}
205220
}

readme.txt

+24-16
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
=== a3 Lazy Load ===
22
Contributors: a3rev, a3rev Software, nguyencongtuan
3-
Tags: a3 lazy load, Lazy Loading , image lazy load, lazyload
3+
Tags: a3 lazy load, Lazy Loading, image lazy load, lazyload
44
Requires at least: 4.9
55
Tested up to: 5.3.2
6-
Stable tag: 2.2.2
6+
Stable tag: 2.3.0
77
License: GPLv3
88
License URI: http://www.gnu.org/licenses/gpl-3.0.html
99

@@ -26,18 +26,22 @@ Images are the number one element that slows page load and increases bandwidth u
2626
* Apply to post thumbnails
2727
* Apply to gravatars
2828

29+
= HORIZONTAL SCROLL =
30+
31+
Supports lazy loading of images in containers that use horizontal scroll. The admin Images options has a section where you enter the classname or ID of the container that uses horizontal scroll.
32+
2933
= MORE THAN JUST IMAGES =
3034

3135
= VIDEO LAZY LOAD =
3236

3337
a3 Lazy Load supports all WordPress video Embeds including Youtube, Vimeo and HTML5 video - for a full list see the [WordPress Codex Embeds](http://codex.wordpress.org/Embeds) list. The WordPress embed method of copying and pasting the video url into posts and pages content area is fully supported.
3438

35-
<strong>Note</strong> - Works with Videos added by Text and HTML Widgets but not the new WordPress Video widget. That widget does not pull iframe at first load, it use JavaScript to replace html to iframe and hence a3 lazy Load can't see it to apply.
39+
<strong>Note</strong> - Works with Videos added by Text and HTML Widgets but not the new WordPress Video widget. That widget does not pull iframe at first load, it uses JavaScript to replace html to iframe and hence a3 lazy Load can't see it to apply.
3640

3741
From the a3 lazy Load admin panel turn Video Support ON | OFF. When ON you can choose to ON | OFF lazy load for videos in
3842

3943
* Video embeded by URL in Post and Pages (All Content areas)
40-
* Video in Widget types, Text Widget and HTML Wigets.
44+
* Video in Widget types, Text Widget and HTML Widgets.
4145
* Youtube [see demo](http://ressio.github.io/lazy-load-xt/demo/youtube-iframe.htm)
4246
* Video [see demo](http://ressio.github.io/lazy-load-xt/demo/video-html5.htm)
4347
* Fully Compatible with the popular [Youtube Embed Plugin](https://wordpress.org/plugins/youtube-embed/)
@@ -65,20 +69,12 @@ a3 Lazy Load has built in support for content that is added by iframe from any s
6569

6670
= JETPACK SITE ACCELERATOR (Proton) =
6771

68-
This is an option that you turn on as the Jetpack Accelerator (Proton CDN images) has its own lazy load feature that needs to be OFF first to be able use a3 Lazy Load as your lazy Load engine. Some users prefer to use a3 Lazy Load as it applies Lazy Load to the whole site not just images.
72+
This is an option that you turn on as the Jetpack Accelerator (Proton CDN images) has its own lazy load feature that needs to be OFF first to be able use a3 Lazy Load as your lazy Load engine. Some users prefer to use a3 Lazy Load as it applies Lazy Load to videos and iframes as well as images.
6973

7074
= WebP IMAGES =
7175

72-
As of a3 Lazy Load has built in automatic support for WebP images. There are no settings for this as a3 Lazy Load will automatically detect if an image has a WebP version and load that. If no WebP image exists the appropriate jpg or png version will be loaded. Also fully support browser detection of WebP.
73-
74-
75-
= WOOCOMMERCE =
76+
a3 Lazy Load has built in automatic support for WebP images. There are no settings for this as a3 Lazy Load will automatically detect if an image has a WebP version and lazy load the WebP version. If no WebP image exists, the appropriate jpg or png version will be lazy loaded. Also fully support browser detection of WebP.
7677

77-
a3 lazy Load is built and tested to be fully compatible with the very widely used WooCommerce plugin
78-
79-
= ADVANCED CUSTOM FIELDS =
80-
81-
Fully compatible with the very popular Advanced Custom Fields plugin, Free and Premium versions.
8278

8379
= LAZY LOAD EFFECTS =
8480

@@ -114,10 +110,12 @@ Don't forget when a developer does add full compatibility with a3 Lazy Load plea
114110

115111
These are just some of the more popular plugins that are either tested 100% compatible with a3 Lazy Load or tags has been added for 100% compatibility.
116112

117-
* Plugin - Advanced Custom Fields
113+
* Plugin - Advanced Custom Fields (Free and Premium)
118114
* Plugin - WooCommerce
115+
* Plugin - JetPack
116+
* Plugin - Elementor (Free and Pro)
119117
* Plugin - WP Offload
120-
* Plugin - WP Super Cache and W3 Total Cache plugins
118+
* Plugin - WP Super Cache, W3 Total Cache, Autoptimize
121119
* Plugin - Youtube Embed
122120
* Plugin - WordPress AMP
123121
* Plugin - WPTouch. Note - Set to not apply on Mobiles if WPTouch is installed
@@ -206,6 +204,13 @@ Filter tags to add to class name of theme to exclude lazy load on images or vide
206204

207205
== Changelog ==
208206

207+
= 2.3.0 - 2020/02/25 =
208+
* This feature release adds support for horizontal scroll images plus a bug fix for compatibility with Revolution Slider
209+
* Feature - Add support for lazy loading images in a container that have horizontal scroll
210+
* Feature - Add Horizontal Scroll section to the Lazy Load Images option box on the admin panel
211+
* Feature - Apply Horizontal Scroll lazy load to any container by classname or ID
212+
* Fix - Compatibility with Revolution slider. Their JS has changed in a resent update causing a conflict which meant that the slider images did not show with a3 Lazy Load activated.
213+
209214
= 2.2.2 - 2020/01/18 =
210215
* This maintenance release is to update incorrect help text regarding usage of the new class and attribute exclusion strings
211216
* Tweak - Update incorrect FQA help text on plugins description
@@ -475,6 +480,9 @@ Filter tags to add to class name of theme to exclude lazy load on images or vide
475480

476481
== Upgrade Notice ==
477482

483+
= 2.3.0 =
484+
This feature release adds support for horizontal scroll images plus a bug fix for compatibility with Revolution Slider
485+
478486
= 2.2.2 =
479487
This maintenance release is to update incorrect help text regarding usage of the new class and attribute exclusion strings
480488

0 commit comments

Comments
 (0)