Version Description
Bugfix release
Download this release
Release Info
Developer | bjornjohansen |
Plugin | BJ Lazy Load |
Version | 0.6.9 |
Comparing to | |
See all releases |
Code changes from version 0.6.8 to 0.6.9
- bj-lazy-load.php +5 -5
- readme.txt +11 -3
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.6.
|
7 |
Author: Bjørn Johansen
|
8 |
Author URI: http://twitter.com/bjornjohansen
|
9 |
License: GPL2
|
@@ -171,8 +171,8 @@ if ( ! class_exists( 'BJLL' ) ) {
|
|
171 |
$replaceHTML = preg_replace( '/<img(.*?)src=/i', '<img$1src="' . $this->_placeholder_url . '" data-lazy-type="image" data-lazy-src=', $imgHTML );
|
172 |
|
173 |
// add the lazy class to the img element
|
174 |
-
if ( preg_match( '/class="/i', $replaceHTML ) ) {
|
175 |
-
$replaceHTML = preg_replace( '/class="(.*?)"/i', 'class
|
176 |
} else {
|
177 |
$replaceHTML = preg_replace( '/<img/i', '<img class="lazy lazy-hidden"', $replaceHTML );
|
178 |
}
|
@@ -218,7 +218,7 @@ if ( ! class_exists( 'BJLL' ) ) {
|
|
218 |
return $content;
|
219 |
}
|
220 |
|
221 |
-
protected function _get_options() {
|
222 |
return new scbOptions( 'bj_lazy_load_options', __FILE__, array(
|
223 |
'filter_content' => 'yes',
|
224 |
'filter_post_thumbnails' => 'yes',
|
@@ -236,7 +236,7 @@ if ( ! class_exists( 'BJLL' ) ) {
|
|
236 |
) );
|
237 |
}
|
238 |
|
239 |
-
function options_init() {
|
240 |
|
241 |
$options = self::_get_options();
|
242 |
|
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.6.9
|
7 |
Author: Bjørn Johansen
|
8 |
Author URI: http://twitter.com/bjornjohansen
|
9 |
License: GPL2
|
171 |
$replaceHTML = preg_replace( '/<img(.*?)src=/i', '<img$1src="' . $this->_placeholder_url . '" data-lazy-type="image" data-lazy-src=', $imgHTML );
|
172 |
|
173 |
// add the lazy class to the img element
|
174 |
+
if ( preg_match( '/class=["\']/i', $replaceHTML ) ) {
|
175 |
+
$replaceHTML = preg_replace( '/class=(["\'])(.*?)["\']/i', 'class=$1lazy lazy-hidden $2$1', $replaceHTML );
|
176 |
} else {
|
177 |
$replaceHTML = preg_replace( '/<img/i', '<img class="lazy lazy-hidden"', $replaceHTML );
|
178 |
}
|
218 |
return $content;
|
219 |
}
|
220 |
|
221 |
+
protected static function _get_options() {
|
222 |
return new scbOptions( 'bj_lazy_load_options', __FILE__, array(
|
223 |
'filter_content' => 'yes',
|
224 |
'filter_post_thumbnails' => 'yes',
|
236 |
) );
|
237 |
}
|
238 |
|
239 |
+
static function options_init() {
|
240 |
|
241 |
$options = self::_get_options();
|
242 |
|
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, iframes, lazy loading, jquery, javascript, optimize, performance, bandwidth, responsive design, hidpi, retina
|
5 |
Author URI: http://twitter.com/bjornjohansen
|
6 |
Requires at least: 3.3
|
7 |
-
Tested up to: 3.
|
8 |
-
Stable tag: 0.6.
|
9 |
|
10 |
Lazy loading makes your site load faster and saves bandwidth. Uses jQuery and degrades gracefully for non-js users. Works with both images and iframes.
|
11 |
|
@@ -22,6 +22,7 @@ Non-javascript visitors gets the original element in noscript.
|
|
22 |
* Automaticly serve scaled down images in responsive designs
|
23 |
* Automaticly serve hiDPI images for hiDPI screens (like Apples Retina Display)
|
24 |
|
|
|
25 |
|
26 |
== Installation ==
|
27 |
1. Download and unzip plugin
|
@@ -59,12 +60,16 @@ Check your HTML source or see the magic at work in Web Inspector, FireBug or sim
|
|
59 |
|
60 |
== Changelog ==
|
61 |
|
|
|
|
|
|
|
|
|
62 |
= Version 0.6.8 =
|
63 |
* Bugfix: sonar.js wouldn't load properly when SCRIPT_DEBUG was set to true (thanks @techawakening)
|
64 |
|
65 |
= Version 0.6.7 =
|
66 |
* Combined JS files for faster loading
|
67 |
-
* Bugfix for when viewport is resized
|
68 |
|
69 |
= Version 0.6.6 =
|
70 |
* Option to disable BJ Lazy Load for MobilePress
|
@@ -161,6 +166,9 @@ Check your HTML source or see the magic at work in Web Inspector, FireBug or sim
|
|
161 |
|
162 |
== Upgrade Notice ==
|
163 |
|
|
|
|
|
|
|
164 |
= 0.6.8 =
|
165 |
Bugfix: Works with SCRIPT_DEBUG
|
166 |
|
4 |
Tags: images, iframes, lazy loading, jquery, javascript, optimize, performance, bandwidth, responsive design, hidpi, retina
|
5 |
Author URI: http://twitter.com/bjornjohansen
|
6 |
Requires at least: 3.3
|
7 |
+
Tested up to: 3.6
|
8 |
+
Stable tag: 0.6.9
|
9 |
|
10 |
Lazy loading makes your site load faster and saves bandwidth. Uses jQuery and degrades gracefully for non-js users. Works with both images and iframes.
|
11 |
|
22 |
* Automaticly serve scaled down images in responsive designs
|
23 |
* Automaticly serve hiDPI images for hiDPI screens (like Apples Retina Display)
|
24 |
|
25 |
+
Please let me know if you have any issues. Fastest way to get a response is by Twitter: http://twitter.com/bjornjohansen
|
26 |
|
27 |
== Installation ==
|
28 |
1. Download and unzip plugin
|
60 |
|
61 |
== Changelog ==
|
62 |
|
63 |
+
= Version 0.6.9 =
|
64 |
+
* Bugfix: Single quotes for the class attribute is now handled (thanks @kReEsTaL)
|
65 |
+
* Bugfix: Removed strict error notice (thanks syndrael)
|
66 |
+
|
67 |
= Version 0.6.8 =
|
68 |
* Bugfix: sonar.js wouldn't load properly when SCRIPT_DEBUG was set to true (thanks @techawakening)
|
69 |
|
70 |
= Version 0.6.7 =
|
71 |
* Combined JS files for faster loading
|
72 |
+
* Bugfix for when viewport is resized – now triggering scroll event (thanks kReEsTaL)
|
73 |
|
74 |
= Version 0.6.6 =
|
75 |
* Option to disable BJ Lazy Load for MobilePress
|
166 |
|
167 |
== Upgrade Notice ==
|
168 |
|
169 |
+
= 0.6.9 =
|
170 |
+
Bugfix release
|
171 |
+
|
172 |
= 0.6.8 =
|
173 |
Bugfix: Works with SCRIPT_DEBUG
|
174 |
|