Version Description
Now works with Unicode filenames
Download this release
Release Info
Developer | bjornjohansen |
Plugin | BJ Lazy Load |
Version | 0.2.5 |
Comparing to | |
See all releases |
Code changes from version 0.2.4 to 0.2.5
- bj-lazy-load.php +16 -3
- 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.2.
|
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.2.
|
32 |
private $_placeholder_url;
|
33 |
|
34 |
function __construct() {
|
@@ -151,7 +151,9 @@ var BJLL = {
|
|
151 |
|
152 |
protected function _get_placeholder_html_dom ( $html ) {
|
153 |
|
154 |
-
$
|
|
|
|
|
155 |
if ( ! $doc ) {
|
156 |
return $this->_get_placeholder_html_regexp( $html );
|
157 |
}
|
@@ -219,6 +221,8 @@ class BJLL_Admin {
|
|
219 |
add_action( 'init', array( $this, 'load_i18n' ) );
|
220 |
add_action( 'admin_menu', array( $this, 'plugin_menu' ) );
|
221 |
add_action( 'admin_init', array( $this, 'register_settings' ) );
|
|
|
|
|
222 |
}
|
223 |
|
224 |
function load_i18n() {;
|
@@ -229,6 +233,15 @@ class BJLL_Admin {
|
|
229 |
add_options_page( 'BJ Lazy Load', 'BJ Lazy Load', 'manage_options', 'bjll', array( $this, 'plugin_options_page' ) );
|
230 |
}
|
231 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
function register_settings () {
|
233 |
register_setting( 'bjll_options', 'bjll_filter_post_thumbnails', 'intval' );
|
234 |
register_setting( 'bjll_options', 'bjll_include_js', 'intval' );
|
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.2.5
|
7 |
Author: Bjørn Johansen
|
8 |
Author URI: http://twitter.com/bjornjohansen
|
9 |
License: GPL2
|
28 |
|
29 |
class BJLL {
|
30 |
|
31 |
+
const version = '0.2.5';
|
32 |
private $_placeholder_url;
|
33 |
|
34 |
function __construct() {
|
151 |
|
152 |
protected function _get_placeholder_html_dom ( $html ) {
|
153 |
|
154 |
+
$loadhtml = sprintf( '<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"><title></title></head><body>%s</body></html>', $html );
|
155 |
+
|
156 |
+
$doc = DOMDocument::loadHTML( $loadhtml );
|
157 |
if ( ! $doc ) {
|
158 |
return $this->_get_placeholder_html_regexp( $html );
|
159 |
}
|
221 |
add_action( 'init', array( $this, 'load_i18n' ) );
|
222 |
add_action( 'admin_menu', array( $this, 'plugin_menu' ) );
|
223 |
add_action( 'admin_init', array( $this, 'register_settings' ) );
|
224 |
+
|
225 |
+
add_filter( 'plugin_action_links', array( $this, 'plugin_settings_link' ), 10, 2);
|
226 |
}
|
227 |
|
228 |
function load_i18n() {;
|
233 |
add_options_page( 'BJ Lazy Load', 'BJ Lazy Load', 'manage_options', 'bjll', array( $this, 'plugin_options_page' ) );
|
234 |
}
|
235 |
|
236 |
+
public static function plugin_settings_link( $links, $file ) {
|
237 |
+
|
238 |
+
if ( plugin_basename( __FILE__ ) == $file ) {
|
239 |
+
array_unshift($links, '<a href="' . admin_url( 'admin.php' ) . '?page=bjll">' . __( 'Settings' ) . '</a>');
|
240 |
+
}
|
241 |
+
|
242 |
+
return $links;
|
243 |
+
}
|
244 |
+
|
245 |
function register_settings () {
|
246 |
register_setting( 'bjll_options', 'bjll_filter_post_thumbnails', 'intval' );
|
247 |
register_setting( 'bjll_options', 'bjll_include_js', 'intval' );
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: bjornjohansen
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=NLUWR4SHCJRBJ
|
4 |
Tags: images, lazy loading, jquery, javascript, optimize, performance, bandwidth
|
5 |
Author URI: http://twitter.com/bjornjohansen
|
6 |
-
Requires at least: 3.
|
7 |
Tested up to: 3.3
|
8 |
-
Stable tag: 0.2.
|
9 |
|
10 |
Lazy image loading makes your site load faster and saves bandwidth. Uses jQuery and degrades gracefully for non-js users.
|
11 |
|
@@ -46,6 +46,9 @@ Check your HTML source or see the magic at work in FireBug or similar.
|
|
46 |
|
47 |
== Changelog ==
|
48 |
|
|
|
|
|
|
|
49 |
= Version 0.2.4 =
|
50 |
* Now (more) compliant to the WP coding style guidelines.
|
51 |
* All strings localized
|
@@ -76,6 +79,9 @@ Check your HTML source or see the magic at work in FireBug or similar.
|
|
76 |
|
77 |
== Upgrade Notice ==
|
78 |
|
|
|
|
|
|
|
79 |
= 0.2.4 =
|
80 |
Better localization
|
81 |
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=NLUWR4SHCJRBJ
|
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.2.5
|
9 |
|
10 |
Lazy image loading makes your site load faster and saves bandwidth. Uses jQuery and degrades gracefully for non-js users.
|
11 |
|
46 |
|
47 |
== Changelog ==
|
48 |
|
49 |
+
= Version 0.2.5 =
|
50 |
+
* Fixes Unicode-issue with filenames
|
51 |
+
|
52 |
= Version 0.2.4 =
|
53 |
* Now (more) compliant to the WP coding style guidelines.
|
54 |
* All strings localized
|
79 |
|
80 |
== Upgrade Notice ==
|
81 |
|
82 |
+
= 0.2.5 =
|
83 |
+
Now works with Unicode filenames
|
84 |
+
|
85 |
= 0.2.4 =
|
86 |
Better localization
|
87 |
|