Version Description
Download this release
Release Info
Developer | bjornjohansen |
Plugin | BJ Lazy Load |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.0.1
- bj-lazy-load.php +1 -1
- inc/class-bjll.php +2 -2
- readme.txt +4 -1
bj-lazy-load.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: BJ Lazy Load
|
4 |
Plugin URI: https://wordpress.org/plugins/bj-lazy-load/
|
5 |
Description: Lazy image loading makes your site load faster and saves bandwidth.
|
6 |
-
Version: 1.0
|
7 |
Author: Bjørn Johansen
|
8 |
Author URI: http://twitter.com/bjornjohansen
|
9 |
Text Domain: bj-lazy-load
|
3 |
Plugin Name: BJ Lazy Load
|
4 |
Plugin URI: https://wordpress.org/plugins/bj-lazy-load/
|
5 |
Description: Lazy image loading makes your site load faster and saves bandwidth.
|
6 |
+
Version: 1.0.1
|
7 |
Author: Bjørn Johansen
|
8 |
Author URI: http://twitter.com/bjornjohansen
|
9 |
Text Domain: bj-lazy-load
|
inc/class-bjll.php
CHANGED
@@ -194,7 +194,7 @@ class BJLL {
|
|
194 |
if ( ! preg_match( "/src=['\"]data:image/is", $imgHTML ) ) {
|
195 |
|
196 |
// replace the src and add the data-src attribute
|
197 |
-
$replaceHTML = preg_replace( '/<img(.*?)src=/is', '<img$1src="' .
|
198 |
|
199 |
// also replace the srcset (responsive images)
|
200 |
$replaceHTML = str_replace( 'srcset', 'data-lazy-srcset', $replaceHTML );
|
@@ -248,7 +248,7 @@ class BJLL {
|
|
248 |
continue;
|
249 |
}
|
250 |
|
251 |
-
$replaceHTML = '<img src="' .
|
252 |
|
253 |
$replaceHTML .= '<noscript>' . $iframeHTML . '</noscript>';
|
254 |
|
194 |
if ( ! preg_match( "/src=['\"]data:image/is", $imgHTML ) ) {
|
195 |
|
196 |
// replace the src and add the data-src attribute
|
197 |
+
$replaceHTML = preg_replace( '/<img(.*?)src=/is', '<img$1src="' . esc_attr( $placeholder_url ) . '" data-lazy-type="image" data-lazy-src=', $imgHTML );
|
198 |
|
199 |
// also replace the srcset (responsive images)
|
200 |
$replaceHTML = str_replace( 'srcset', 'data-lazy-srcset', $replaceHTML );
|
248 |
continue;
|
249 |
}
|
250 |
|
251 |
+
$replaceHTML = '<img src="' . esc_attr( $placeholder_url ) . '" class="lazy lazy-hidden" data-lazy-type="iframe" data-lazy-src="' . esc_attr( $iframeHTML ) . '" alt="">';
|
252 |
|
253 |
$replaceHTML .= '<noscript>' . $iframeHTML . '</noscript>';
|
254 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: images, iframes, lazy loading, javascript, optimize, performance, bandwidt
|
|
5 |
Author URI: http://twitter.com/bjornjohansen
|
6 |
Requires at least: 3.5
|
7 |
Tested up to: 4.3
|
8 |
-
Stable tag: 1.0
|
9 |
|
10 |
Lazy loading makes your site load faster and saves bandwidth. Uses no external JS libraries and degrades gracefully for non-js users. Works with both images and iframes (like embedded YouTube videos).
|
11 |
|
@@ -59,6 +59,9 @@ Check your HTML source or see the magic at work in Web Inspector, FireBug or sim
|
|
59 |
|
60 |
== Changelog ==
|
61 |
|
|
|
|
|
|
|
62 |
= Version 1.0 =
|
63 |
* Internal rewrite. Code cleanup.
|
64 |
* Supports 3rd party filters
|
5 |
Author URI: http://twitter.com/bjornjohansen
|
6 |
Requires at least: 3.5
|
7 |
Tested up to: 4.3
|
8 |
+
Stable tag: 1.0.1
|
9 |
|
10 |
Lazy loading makes your site load faster and saves bandwidth. Uses no external JS libraries and degrades gracefully for non-js users. Works with both images and iframes (like embedded YouTube videos).
|
11 |
|
59 |
|
60 |
== Changelog ==
|
61 |
|
62 |
+
= Version 1.0.1 =
|
63 |
+
* Fixes issue with missing placeholder
|
64 |
+
|
65 |
= Version 1.0 =
|
66 |
* Internal rewrite. Code cleanup.
|
67 |
* Supports 3rd party filters
|