a3 Lazy Load - Version 1.3.0

Version Description

Feature Upgrade. New Image Loading Threshold feature. Set threshold in pixel that images will start to load before they reach the viewport.

Download this release

Release Info

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

Code changes from version 1.2.2 to 1.3.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: 1.2.2
6
  Author: a3 Revolution
7
  Author URI: http://www.a3rev.com/
8
  Requires at least: 3.8
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.3.0
6
  Author: a3 Revolution
7
  Author URI: http://www.a3rev.com/
8
  Requires at least: 3.8
admin/a3-lazy-load-admin.php CHANGED
@@ -2,7 +2,7 @@
2
  update_option('a3rev_lazy_load_plugin', 'a3_lazy_load');
3
 
4
  function a3_lazy_load_activated(){
5
- update_option('a3_lazy_load_version', '1.2.2');
6
 
7
  // Set Settings Default from Admin Init
8
  global $a3_lazy_load_admin_init;
@@ -51,6 +51,6 @@ function a3_lazy_load_upgrade_plugin() {
51
  update_option('a3_lazy_load_version', '1.1.0');
52
  }
53
 
54
- update_option('a3_lazy_load_version', '1.2.2');
55
  }
56
  ?>
2
  update_option('a3rev_lazy_load_plugin', 'a3_lazy_load');
3
 
4
  function a3_lazy_load_activated(){
5
+ update_option('a3_lazy_load_version', '1.3.0');
6
 
7
  // Set Settings Default from Admin Init
8
  global $a3_lazy_load_admin_init;
51
  update_option('a3_lazy_load_version', '1.1.0');
52
  }
53
 
54
+ update_option('a3_lazy_load_version', '1.3.0');
55
  }
56
  ?>
admin/settings/template-settings/global-settings.php CHANGED
@@ -414,6 +414,19 @@ class A3_Lazy_Load_Global_Settings extends A3_Lazy_Load_Admin_UI
414
  'default' => '#ffffff'
415
  ),
416
 
 
 
 
 
 
 
 
 
 
 
 
 
 
417
  array(
418
  'type' => 'heading',
419
  'id' => 'a3l_container_end'
414
  'default' => '#ffffff'
415
  ),
416
 
417
+ array(
418
+ 'name' => __( 'Image Load Threshold', 'a3_lazy_load' ),
419
+ 'type' => 'heading',
420
+ ),
421
+ array(
422
+ 'name' => __( 'Threshold', 'a3_lazy_load' ),
423
+ 'id' => 'a3l_edgeY',
424
+ 'desc' => 'px ' . __( 'Expands visible page area (viewport) in vertical direction by the amount of pixels set. Elements start to load as soon as the reach the threshold instead of when they reach the actual viewport.', 'a3_lazy_load' ),
425
+ 'type' => 'text',
426
+ 'default' => 0,
427
+ 'css' => 'width: 80px;'
428
+ ),
429
+
430
  array(
431
  'type' => 'heading',
432
  'id' => 'a3l_container_end'
assets/js/jquery.lazyloadxt.extend.js CHANGED
@@ -1 +1,2 @@
1
- jQuery.lazyLoadXT.updateEvent = 'load orientationchange resize scroll touchmove focus click';
 
1
+ jQuery.lazyLoadXT.updateEvent = 'load orientationchange resize scroll touchmove focus click';
2
+ jQuery.lazyLoadXT.edgeY = a3_lazyload_extend_params.edgeY;
classes/class-a3-lazy-load.php CHANGED
@@ -151,6 +151,12 @@ class A3_Lazy_Load
151
  'apply_videos' => $a3_lazy_load_global_settings['a3l_apply_to_videos']
152
  ) ) );
153
  }
 
 
 
 
 
 
154
  }
155
 
156
  static function is_wptouch() {
151
  'apply_videos' => $a3_lazy_load_global_settings['a3l_apply_to_videos']
152
  ) ) );
153
  }
154
+
155
+ if ( wp_script_is( 'jquery-lazyloadxt-extend' ) ) {
156
+ wp_localize_script( 'jquery-lazyloadxt-extend', 'a3_lazyload_extend_params', apply_filters( 'a3_lazyload_extend_params', array(
157
+ 'edgeY' => (int) $a3_lazy_load_global_settings['a3l_edgeY'],
158
+ ) ) );
159
+ }
160
  }
161
 
162
  static function is_wptouch() {
languages/a3_lazy_load.mo CHANGED
Binary file
languages/a3_lazy_load.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: a3 Lazy Load\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-01-23 17:36+0700\n"
6
- "PO-Revision-Date: 2015-01-23 17:36+0700\n"
7
  "Last-Translator: Nguyen Cong Tuan <mr.nguyencongtuan@gmail.com>\n"
8
  "Language-Team: a3rev\n"
9
  "Language: en\n"
@@ -426,6 +426,21 @@ msgstr ""
426
  msgid "Loading Background Colour"
427
  msgstr ""
428
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
429
  #: classes/addons/class-a3-lazy-load-addons-page.php:23
430
  #: classes/addons/class-a3-lazy-load-addons-page.php:38
431
  msgid "a3 Lazy Load Add-ons/Extensions"
2
  msgstr ""
3
  "Project-Id-Version: a3 Lazy Load\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2015-06-05 17:22+0700\n"
6
+ "PO-Revision-Date: 2015-06-05 17:22+0700\n"
7
  "Last-Translator: Nguyen Cong Tuan <mr.nguyencongtuan@gmail.com>\n"
8
  "Language-Team: a3rev\n"
9
  "Language: en\n"
426
  msgid "Loading Background Colour"
427
  msgstr ""
428
 
429
+ #: admin/settings/template-settings/global-settings.php:418
430
+ msgid "Image Load Threshold"
431
+ msgstr ""
432
+
433
+ #: admin/settings/template-settings/global-settings.php:422
434
+ msgid "Threshold"
435
+ msgstr ""
436
+
437
+ #: admin/settings/template-settings/global-settings.php:424
438
+ msgid ""
439
+ "Expands visible page area (viewport) in vertical direction by the amount of "
440
+ "pixels set. Elements start to load as soon as the reach the threshold "
441
+ "instead of when they reach the actual viewport."
442
+ msgstr ""
443
+
444
  #: classes/addons/class-a3-lazy-load-addons-page.php:23
445
  #: classes/addons/class-a3-lazy-load-addons-page.php:38
446
  msgid "a3 Lazy Load Add-ons/Extensions"
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: a3rev, A3 Revolution Software Development team
4
  Tags: a3 lazy load, Lazy Loading , image lazy load, lazyload
5
  Requires at least: 4.0
6
  Tested up to: 4.2.2
7
- Stable tag: 1.2.2
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -144,6 +144,10 @@ Automatic installation is the easiest option as WordPress handles the file trans
144
 
145
  == Changelog ==
146
 
 
 
 
 
147
  = 1.2.2 - 2015/06/03 =
148
  * Tweak - Security Hardening. Removed all php file_put_contents functions in the plugin framework and replace with the WP_Filesystem API
149
  * Tweak - Security Hardening. Removed all php file_get_contents functions in the plugin framework and replace with the WP_Filesystem API
@@ -199,6 +203,9 @@ Automatic installation is the easiest option as WordPress handles the file trans
199
 
200
  == Upgrade Notice ==
201
 
 
 
 
202
  = 1.2.2 =
203
  Important Maintenance Upgrade. 2 x major a3rev Plugin Framework Security Hardening Tweaks
204
 
4
  Tags: a3 lazy load, Lazy Loading , image lazy load, lazyload
5
  Requires at least: 4.0
6
  Tested up to: 4.2.2
7
+ Stable tag: 1.3.0
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
144
 
145
  == Changelog ==
146
 
147
+ = 1.3.0 - 2015/06/05 =
148
+ * Feature - Added Image Load Threshold with set threshold pixel dynamic setting. Default is 0px
149
+ * Credit - Thanks to [Onisforos and Matt Pain](https://wordpress.org/support/topic/setting-threshold?replies=3) for suggesting and explaining the new Threshold feature
150
+
151
  = 1.2.2 - 2015/06/03 =
152
  * Tweak - Security Hardening. Removed all php file_put_contents functions in the plugin framework and replace with the WP_Filesystem API
153
  * Tweak - Security Hardening. Removed all php file_get_contents functions in the plugin framework and replace with the WP_Filesystem API
203
 
204
  == Upgrade Notice ==
205
 
206
+ = 1.3.0 =
207
+ Feature Upgrade. New Image Loading Threshold feature. Set threshold in pixel that images will start to load before they reach the viewport.
208
+
209
  = 1.2.2 =
210
  Important Maintenance Upgrade. 2 x major a3rev Plugin Framework Security Hardening Tweaks
211