BJ Lazy Load - Version 0.3.1

Version Description

Lazy load any image in your theme. Load in head.

Download this release

Release Info

Developer bjornjohansen
Plugin Icon 128x128 BJ Lazy Load
Version 0.3.1
Comparing to
See all releases

Code changes from version 0.3.0 to 0.3.1

Files changed (2) hide show
  1. bj-lazy-load.php +7 -3
  2. readme.txt +8 -2
bj-lazy-load.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: BJ Lazy Load
4
  Plugin URI: http://wordpress.org/extend/plugins/bj-lazy-load/
5
  Description: Lazy image loading makes your site load faster and saves bandwidth.
6
- Version: 0.3.0
7
  Author: Bjørn Johansen
8
  Author URI: http://twitter.com/bjornjohansen
9
  License: GPL2
@@ -28,7 +28,7 @@ License: GPL2
28
 
29
  class BJLL {
30
 
31
- const version = '0.3.0';
32
  private $_placeholder_url;
33
 
34
  private static $_instance;
@@ -179,7 +179,11 @@ var BJLL = {
179
 
180
  $images = $doc->getElementsByTagName( 'img' );
181
 
182
- $img = $images->item( 0 );
 
 
 
 
183
 
184
  //foreach ( $images as $img ) {
185
 
3
  Plugin Name: BJ Lazy Load
4
  Plugin URI: http://wordpress.org/extend/plugins/bj-lazy-load/
5
  Description: Lazy image loading makes your site load faster and saves bandwidth.
6
+ Version: 0.3.1
7
  Author: Bjørn Johansen
8
  Author URI: http://twitter.com/bjornjohansen
9
  License: GPL2
28
 
29
  class BJLL {
30
 
31
+ const version = '0.3.1';
32
  private $_placeholder_url;
33
 
34
  private static $_instance;
179
 
180
  $images = $doc->getElementsByTagName( 'img' );
181
 
182
+ //$img = $images->item( 0 );
183
+ // Thanks to d.sturm for pointing this out: http://wordpress.org/support/topic/plugin-bj-lazy-load?replies=3#post-2539962
184
+ if ( ! $img = $images->item( 0 ) ) {
185
+ return $this->_get_placeholder_html_regexp( $html );
186
+ }
187
 
188
  //foreach ( $images as $img ) {
189
 
readme.txt CHANGED
@@ -4,8 +4,8 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: images, lazy loading, jquery, javascript, optimize, performance, bandwidth
5
  Author URI: http://twitter.com/bjornjohansen
6
  Requires at least: 3.1
7
- Tested up to: 3.3
8
- Stable tag: 0.3.0
9
 
10
  Lazy image loading makes your site load faster and saves bandwidth. Uses jQuery and degrades gracefully for non-js users.
11
 
@@ -58,6 +58,9 @@ Check your HTML source or see the magic at work in Web Inspector, FireBug or sim
58
 
59
  == Changelog ==
60
 
 
 
 
61
  = Version 0.3.0 =
62
  * Added BJLL::filter() so you can lazy load any images in your theme
63
  * Added the option to load in wp_head() instead (suboptimal, but some themes actually don't call wp_footer())
@@ -96,6 +99,9 @@ Check your HTML source or see the magic at work in Web Inspector, FireBug or sim
96
 
97
  == Upgrade Notice ==
98
 
 
 
 
99
  = 0.3.0 =
100
  Lazy load any image in your theme
101
 
4
  Tags: images, lazy loading, jquery, javascript, optimize, performance, bandwidth
5
  Author URI: http://twitter.com/bjornjohansen
6
  Requires at least: 3.1
7
+ Tested up to: 3.3.1
8
+ Stable tag: 0.3.1
9
 
10
  Lazy image loading makes your site load faster and saves bandwidth. Uses jQuery and degrades gracefully for non-js users.
11
 
58
 
59
  == Changelog ==
60
 
61
+ = Version 0.3.1 =
62
+ * Also with d.sturm's fix
63
+
64
  = Version 0.3.0 =
65
  * Added BJLL::filter() so you can lazy load any images in your theme
66
  * Added the option to load in wp_head() instead (suboptimal, but some themes actually don't call wp_footer())
99
 
100
  == Upgrade Notice ==
101
 
102
+ = 0.3.1 =
103
+ Lazy load any image in your theme. Load in head.
104
+
105
  = 0.3.0 =
106
  Lazy load any image in your theme
107