a3 Lazy Load - Version 2.6.0

Version Description

This release adds the option to switch OFF WordPress Core Lazy Load.

Download this release

Release Info

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

Code changes from version 2.5.1 to 2.6.0

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: 2.5.1
6
  Author: a3rev Software
7
  Author URI: https://a3rev.com/
8
  Requires at least: 5.6
@@ -31,7 +31,7 @@ define('A3_LAZY_LOAD_IMAGES_URL', A3_LAZY_LOAD_URL . '/assets/images');
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.5.1' );
35
  define( 'A3_LAZY_LOAD_G_FONTS', false );
36
 
37
  use \A3Rev\LazyLoad\FrameWork;
@@ -87,7 +87,7 @@ include( 'classes/classes-backwards-compatibility.php' );
87
  include( 'admin/a3-lazy-load-admin.php' );
88
 
89
  // Defined this function for check Lazy Load is enabled that 3rd party plugins or theme can use to check
90
- $a3_lazy_load_global_settings = get_option( 'a3_lazy_load_global_settings', array( 'a3l_apply_lazyloadxt' => 1, 'a3l_apply_to_images' => 1, 'a3l_apply_to_videos' => 1 ) );
91
  if ( 1 == $a3_lazy_load_global_settings['a3l_apply_lazyloadxt'] && !is_admin() && ( 1 == $a3_lazy_load_global_settings['a3l_apply_to_images'] || 1 == $a3_lazy_load_global_settings['a3l_apply_to_videos'] ) ) {
92
  function a3_lazy_load_enable() {
93
  return true;
@@ -103,6 +103,9 @@ if ( 1 == $a3_lazy_load_global_settings['a3l_apply_lazyloadxt'] && !is_admin() &
103
  return true;
104
  }
105
  }
 
 
 
106
 
107
  /**
108
  * Call when the plugin is activated
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.6.0
6
  Author: a3rev Software
7
  Author URI: https://a3rev.com/
8
  Requires at least: 5.6
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.6.0' );
35
  define( 'A3_LAZY_LOAD_G_FONTS', false );
36
 
37
  use \A3Rev\LazyLoad\FrameWork;
87
  include( 'admin/a3-lazy-load-admin.php' );
88
 
89
  // Defined this function for check Lazy Load is enabled that 3rd party plugins or theme can use to check
90
+ $a3_lazy_load_global_settings = get_option( 'a3_lazy_load_global_settings', array( 'a3l_apply_lazyloadxt' => 1, 'a3l_wpcore_lazyload' => 1, 'a3l_apply_to_images' => 1, 'a3l_apply_to_videos' => 1 ) );
91
  if ( 1 == $a3_lazy_load_global_settings['a3l_apply_lazyloadxt'] && !is_admin() && ( 1 == $a3_lazy_load_global_settings['a3l_apply_to_images'] || 1 == $a3_lazy_load_global_settings['a3l_apply_to_videos'] ) ) {
92
  function a3_lazy_load_enable() {
93
  return true;
103
  return true;
104
  }
105
  }
106
+ if ( !is_admin() && isset( $a3_lazy_load_global_settings['a3l_wpcore_lazyload'] ) && 0 == $a3_lazy_load_global_settings['a3l_wpcore_lazyload'] ) {
107
+ add_filter( 'wp_lazy_loading_enabled', '__return_false' );
108
+ }
109
 
110
  /**
111
  * Call when the plugin is activated
admin/settings/template-settings/global-settings.php CHANGED
@@ -235,8 +235,9 @@ class Global_Panel extends FrameWork\Admin_UI
235
  'is_box' => true,
236
  ),
237
  array(
238
- 'name' => __( 'Enable Lazy Load', 'a3-lazy-load' ),
239
  'id' => 'a3l_apply_lazyloadxt',
 
240
  'class' => 'a3l_apply_to_load',
241
  'type' => 'onoff_checkbox',
242
  'default' => true,
@@ -245,6 +246,17 @@ class Global_Panel extends FrameWork\Admin_UI
245
  'checked_label' => __( 'ON', 'a3-lazy-load' ),
246
  'unchecked_label' => __( 'OFF', 'a3-lazy-load' ),
247
  ),
 
 
 
 
 
 
 
 
 
 
 
248
 
249
  array(
250
  'name' => __( 'Lazy Load Images', 'a3-lazy-load' ),
235
  'is_box' => true,
236
  ),
237
  array(
238
+ 'name' => __( 'a3 Lazy Load', 'a3-lazy-load' ),
239
  'id' => 'a3l_apply_lazyloadxt',
240
+ 'desc' => __( 'On and a3 Lazy Load will lazy load elements that are missed by WordPress Core Lazy Load.', 'a3-lazy-load' ),
241
  'class' => 'a3l_apply_to_load',
242
  'type' => 'onoff_checkbox',
243
  'default' => true,
246
  'checked_label' => __( 'ON', 'a3-lazy-load' ),
247
  'unchecked_label' => __( 'OFF', 'a3-lazy-load' ),
248
  ),
249
+ array(
250
+ 'name' => __( 'WordPress Core Lazy Load', 'a3-lazy-load' ),
251
+ 'id' => 'a3l_wpcore_lazyload',
252
+ 'desc' => __( 'Switch to OFF to completely disable WordPress core Lazy Load.', 'a3-lazy-load' ),
253
+ 'type' => 'onoff_checkbox',
254
+ 'default' => true,
255
+ 'checked_value' => true,
256
+ 'unchecked_value' => false,
257
+ 'checked_label' => __( 'ON', 'a3-lazy-load' ),
258
+ 'unchecked_label' => __( 'OFF', 'a3-lazy-load' ),
259
+ ),
260
 
261
  array(
262
  'name' => __( 'Lazy Load Images', 'a3-lazy-load' ),
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: 5.6
5
  Tested up to: 6.0
6
- Stable tag: 2.5.1
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -16,9 +16,13 @@ a3 Lazy Load is a Mobile Oriented, very simple to use plugin that will speed up
16
  a3 Lazy Load is inspired by and powered by the ressio [Lazy-Load-xt JavaScript](https://github.com/ressio/lazy-load-xt).
17
 
18
 
19
- = 100% COMPATABLE WITH WORDPRESS 5.9 =
20
 
21
- WordPress 5.5 introduced lazy loading for all images uploaded to a sites media library and 5.7 introduces Core lazy load for iframes and 5.9 contains performance enhancements. a3 Lazy Load Image options work side-by-side with these, but then enhances it by lazy loading all the images loaded from outside of the media library, or on older browsers that do not support the new WP attribute and any iframes or videos that are not lazy loaded by WordPress.
 
 
 
 
22
 
23
  = IMAGE LAZY LOAD =
24
 
@@ -198,6 +202,12 @@ Filter tags to add to class name of theme to exclude lazy load on images or vide
198
 
199
  == Changelog ==
200
 
 
 
 
 
 
 
201
  = 2.5.1 - 2022/06/07 =
202
  * This maintenance release fixes a critical error when updating the plugin settings
203
  * Fix - Add missed $ to _POST constant from textarea control type
@@ -604,6 +614,9 @@ Filter tags to add to class name of theme to exclude lazy load on images or vide
604
 
605
  == Upgrade Notice ==
606
 
 
 
 
607
  = 2.5.1 =
608
  This maintenance release fixes a critical error when updating the plugin settings
609
 
3
  Tags: a3 lazy load, Lazy Loading, image lazy load, lazyload
4
  Requires at least: 5.6
5
  Tested up to: 6.0
6
+ Stable tag: 2.6.0
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
16
  a3 Lazy Load is inspired by and powered by the ressio [Lazy-Load-xt JavaScript](https://github.com/ressio/lazy-load-xt).
17
 
18
 
19
+ = 100% COMPATABLE WITH WORDPRESS 6.0 =
20
 
21
+ WordPress 5.5 introduced lazy loading for all images uploaded to a sites media library and 5.7 introduces Core lazy load for iframes and 5.9 contained performance enhancements. a3 Lazy Load Image options work side-by-side with these, but then enhances it by lazy loading all the images loaded from outside of the media library, or on older browsers that do not support the new WP attribute and any iframes or videos that are not lazy loaded by WordPress.
22
+
23
+ = DISABLE WORDPRESS LAZY LOAD =
24
+
25
+ The plugin includes an option to completely disable WordPress Core Lazy Load if that is what you want to do.
26
 
27
  = IMAGE LAZY LOAD =
28
 
202
 
203
  == Changelog ==
204
 
205
+ = 2.6.0 - 2022/07/20 =
206
+ * This release adds the option to switch OFF WordPress Core Lazy Load.
207
+ * Feature - Add Option to completely disable WordPress Core Lazy Load.
208
+ * Tweak - Add the new option switch to the Lazy Load Activation option box.
209
+ * Tweak - Updated the plugins description to include the new option to disable WordPress Core Lazy Load.
210
+
211
  = 2.5.1 - 2022/06/07 =
212
  * This maintenance release fixes a critical error when updating the plugin settings
213
  * Fix - Add missed $ to _POST constant from textarea control type
614
 
615
  == Upgrade Notice ==
616
 
617
+ = 2.6.0 =
618
+ This release adds the option to switch OFF WordPress Core Lazy Load.
619
+
620
  = 2.5.1 =
621
  This maintenance release fixes a critical error when updating the plugin settings
622