Version Description
Use WordPress bundled jQuery instead of forcing the Google CDN
Download this release
Release Info
Developer | ulfben |
Plugin | WP jQuery Lightbox |
Version | 1.2.2 |
Comparing to | |
See all releases |
Code changes from version 1.2.1 to 1.2.2
- readme.txt +13 -2
- wp-jquery-lightbox.php +14 -10
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: ulfben
|
|
3 |
Donate link: http://amzn.com/w/2QB6SQ5XX2U0N
|
4 |
Tags: lightbox, jquery, nodal, image, display, ulfben
|
5 |
Requires at least: 2.9.2
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 1.2.
|
8 |
|
9 |
A drop-in replacement for Lightbox 2 and similar plugins, shedding the bulk of Prototype and Scriptaculous.
|
10 |
|
@@ -21,6 +21,10 @@ See the plugin in action here: [http://game.hgo.se/blog/motion-capture/](http://
|
|
21 |
|
22 |
*If you value [my plugins](http://profiles.wordpress.org/users/ulfben/) and want to motivate further development - please **help me out** by [downloading and installing DropBox](http://www.dropbox.com/referrals/NTIzMDI3MDk) from my refferal link. It's a cross-plattform application to sync your files online and across computers. A 2GB account is free and my refferal earns you a 250MB bonus!*
|
23 |
|
|
|
|
|
|
|
|
|
24 |
= 1.2.1 (2010-10-24) =
|
25 |
* [Use only caption if title is identical](http://wordpress.org/support/topic/plugin-wp-jquery-lightbox-title-captions-bug-found-solved-and-fix-proposed?replies=8#post-1748874)
|
26 |
* Removed a forgotten debug call
|
@@ -60,6 +64,10 @@ No limits to the number of image sets per page or how many images are allowed in
|
|
60 |
|
61 |
== Changelog ==
|
62 |
|
|
|
|
|
|
|
|
|
63 |
= 1.2.1 (2010-10-24) =
|
64 |
* [Use only caption if title is identical](http://wordpress.org/support/topic/plugin-wp-jquery-lightbox-title-captions-bug-found-solved-and-fix-proposed?replies=8#post-1748874)
|
65 |
* Removed a forgotten debug call
|
@@ -79,6 +87,9 @@ No limits to the number of image sets per page or how many images are allowed in
|
|
79 |
|
80 |
== Upgrade Notice ==
|
81 |
|
|
|
|
|
|
|
82 |
= 1.2.1 =
|
83 |
Removed forgotten debug call. Important upgrade!
|
84 |
|
3 |
Donate link: http://amzn.com/w/2QB6SQ5XX2U0N
|
4 |
Tags: lightbox, jquery, nodal, image, display, ulfben
|
5 |
Requires at least: 2.9.2
|
6 |
+
Tested up to: 3.1.1
|
7 |
+
Stable tag: 1.2.2
|
8 |
|
9 |
A drop-in replacement for Lightbox 2 and similar plugins, shedding the bulk of Prototype and Scriptaculous.
|
10 |
|
21 |
|
22 |
*If you value [my plugins](http://profiles.wordpress.org/users/ulfben/) and want to motivate further development - please **help me out** by [downloading and installing DropBox](http://www.dropbox.com/referrals/NTIzMDI3MDk) from my refferal link. It's a cross-plattform application to sync your files online and across computers. A 2GB account is free and my refferal earns you a 250MB bonus!*
|
23 |
|
24 |
+
= 1.2.2 (2011-04-14) =
|
25 |
+
* Use WordPress bundled jQuery instead of forcing the Google CDN.
|
26 |
+
* Fixed the settings link on the Plugins page.
|
27 |
+
|
28 |
= 1.2.1 (2010-10-24) =
|
29 |
* [Use only caption if title is identical](http://wordpress.org/support/topic/plugin-wp-jquery-lightbox-title-captions-bug-found-solved-and-fix-proposed?replies=8#post-1748874)
|
30 |
* Removed a forgotten debug call
|
64 |
|
65 |
== Changelog ==
|
66 |
|
67 |
+
= 1.2.2 (2011-04-14) =
|
68 |
+
* Use WordPress bundled jQuery instead of forcing the Google CDN
|
69 |
+
* Fixed the settings link on the Plugins page
|
70 |
+
|
71 |
= 1.2.1 (2010-10-24) =
|
72 |
* [Use only caption if title is identical](http://wordpress.org/support/topic/plugin-wp-jquery-lightbox-title-captions-bug-found-solved-and-fix-proposed?replies=8#post-1748874)
|
73 |
* Removed a forgotten debug call
|
87 |
|
88 |
== Upgrade Notice ==
|
89 |
|
90 |
+
= 1.2.2 =
|
91 |
+
Use WordPress bundled jQuery instead of forcing the Google CDN
|
92 |
+
|
93 |
= 1.2.1 =
|
94 |
Removed forgotten debug call. Important upgrade!
|
95 |
|
wp-jquery-lightbox.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: wp-jquery-lightbox
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/wp-jquery-lightbox/
|
5 |
Description: A drop in replacement for LightBox-2 and similar plugins. Uses jQuery to save you from the JS-library mess in your header. :)
|
6 |
-
Version: 1.2.
|
7 |
Author: Ulf Benjaminsson
|
8 |
Author URI: http://www.ulfben.com
|
9 |
*/
|
@@ -14,19 +14,22 @@ if(!defined('WP_PLUGIN_URL')){
|
|
14 |
define('WP_PLUGIN_URL', WP_CONTENT_URL.'/plugins');
|
15 |
}
|
16 |
define('JQLB_DONATE_URL', 'http://www.amazon.com/gp/registry/wishlist/2QB6SQ5XX2U0N/105-3209188-5640446?reveal=unpurchased&filter=all&sort=priority&layout=standard&x=21&y=17');
|
17 |
-
define('JQLB_BASENAME', plugin_basename(
|
18 |
define('JQLB_URL', WP_PLUGIN_URL.'/wp-jquery-lightbox/');
|
19 |
define('JQLB_SCRIPT_URL', JQLB_URL.'jquery.lightbox.min.js');
|
20 |
define('JQLB_STYLE_URL', JQLB_URL.'lightbox.min.css');
|
|
|
21 |
add_action('admin_menu', 'jqlb_register_menu_item');
|
22 |
add_action('wp_print_styles', 'jqlb_css');
|
23 |
add_action('wp_print_scripts', 'jqlb_js');
|
24 |
add_filter('plugin_row_meta', 'jqlb_set_plugin_meta', 2, 10);
|
25 |
add_filter('the_content', 'jqlb_autoexpand_rel_wlightbox', 99);
|
26 |
-
add_filter('the_excerpt', 'jqlb_autoexpand_rel_wlightbox', 99);
|
27 |
function jqlb_set_plugin_meta( $links, $file ) { // Add a link to this plugin's settings page
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
30 |
}
|
31 |
return $links;
|
32 |
}
|
@@ -34,14 +37,17 @@ function jqlb_add_admin_footer(){ //shows some plugin info in the footer of the
|
|
34 |
$plugin_data = get_plugin_data(__FILE__);
|
35 |
printf('%1$s by %2$s (who <a href="'.JQLB_DONATE_URL.'">appreciates books</a>) :)<br />', $plugin_data['Title'].' '.$plugin_data['Version'], $plugin_data['Author']);
|
36 |
}
|
37 |
-
|
|
|
38 |
register_setting( 'jqlb-settings-group', 'jqlb_automate');
|
39 |
register_setting( 'jqlb-settings-group', 'jqlb_resize_on_demand');
|
40 |
register_setting( 'jqlb-settings-group', 'jqlb_resize_speed', 'jqlb_pos_intval');
|
41 |
add_option('jqlb_automate', 1); //default is to auto-lightbox.
|
42 |
add_option('jqlb_resize_on_demand', 1); //default is to resize
|
43 |
add_option('jqlb_resize_speed', 250);
|
44 |
-
|
|
|
|
|
45 |
}
|
46 |
function jqlb_css(){
|
47 |
if(is_admin() || is_feed()){return;}
|
@@ -49,14 +55,12 @@ function jqlb_css(){
|
|
49 |
}
|
50 |
function jqlb_js() {
|
51 |
if(is_admin() || is_feed()){return;}
|
52 |
-
wp_deregister_script('jquery');
|
53 |
-
wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');
|
54 |
wp_enqueue_script('jquery', '', array(), '1.4.2', true);
|
55 |
wp_enqueue_script('wp-jquery-lightbox', JQLB_SCRIPT_URL, Array('jquery'), '1.2', true);
|
56 |
wp_localize_script('wp-jquery-lightbox', 'JQLBSettings', array(
|
57 |
'fitToScreen' => get_option('jqlb_resize_on_demand'),
|
58 |
'resizeSpeed' => get_option('jqlb_resize_speed')
|
59 |
-
|
60 |
}
|
61 |
/* automatically insert rel="lightbox[nameofpost]" to every image with no manual work.
|
62 |
if there are already rel="lightbox[something]" attributes, they are not clobbered.
|
3 |
Plugin Name: wp-jquery-lightbox
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/wp-jquery-lightbox/
|
5 |
Description: A drop in replacement for LightBox-2 and similar plugins. Uses jQuery to save you from the JS-library mess in your header. :)
|
6 |
+
Version: 1.2.2
|
7 |
Author: Ulf Benjaminsson
|
8 |
Author URI: http://www.ulfben.com
|
9 |
*/
|
14 |
define('WP_PLUGIN_URL', WP_CONTENT_URL.'/plugins');
|
15 |
}
|
16 |
define('JQLB_DONATE_URL', 'http://www.amazon.com/gp/registry/wishlist/2QB6SQ5XX2U0N/105-3209188-5640446?reveal=unpurchased&filter=all&sort=priority&layout=standard&x=21&y=17');
|
17 |
+
define('JQLB_BASENAME', plugin_basename(__FILE__));
|
18 |
define('JQLB_URL', WP_PLUGIN_URL.'/wp-jquery-lightbox/');
|
19 |
define('JQLB_SCRIPT_URL', JQLB_URL.'jquery.lightbox.min.js');
|
20 |
define('JQLB_STYLE_URL', JQLB_URL.'lightbox.min.css');
|
21 |
+
add_action('admin_init', 'jqlb_register_settings');
|
22 |
add_action('admin_menu', 'jqlb_register_menu_item');
|
23 |
add_action('wp_print_styles', 'jqlb_css');
|
24 |
add_action('wp_print_scripts', 'jqlb_js');
|
25 |
add_filter('plugin_row_meta', 'jqlb_set_plugin_meta', 2, 10);
|
26 |
add_filter('the_content', 'jqlb_autoexpand_rel_wlightbox', 99);
|
|
|
27 |
function jqlb_set_plugin_meta( $links, $file ) { // Add a link to this plugin's settings page
|
28 |
+
static $this_plugin;
|
29 |
+
if(!$this_plugin) $this_plugin = plugin_basename(__FILE__);
|
30 |
+
if($file == $this_plugin) {
|
31 |
+
$settings_link = '<a href="options-general.php?page=jquery-lightbox-options">'.__('Settings', 'jqlb').'</a>';
|
32 |
+
array_unshift($links, $settings_link);
|
33 |
}
|
34 |
return $links;
|
35 |
}
|
37 |
$plugin_data = get_plugin_data(__FILE__);
|
38 |
printf('%1$s by %2$s (who <a href="'.JQLB_DONATE_URL.'">appreciates books</a>) :)<br />', $plugin_data['Title'].' '.$plugin_data['Version'], $plugin_data['Author']);
|
39 |
}
|
40 |
+
|
41 |
+
function jqlb_register_settings(){
|
42 |
register_setting( 'jqlb-settings-group', 'jqlb_automate');
|
43 |
register_setting( 'jqlb-settings-group', 'jqlb_resize_on_demand');
|
44 |
register_setting( 'jqlb-settings-group', 'jqlb_resize_speed', 'jqlb_pos_intval');
|
45 |
add_option('jqlb_automate', 1); //default is to auto-lightbox.
|
46 |
add_option('jqlb_resize_on_demand', 1); //default is to resize
|
47 |
add_option('jqlb_resize_speed', 250);
|
48 |
+
}
|
49 |
+
function jqlb_register_menu_item() {
|
50 |
+
add_options_page('jQuery Lightbox Options', 'jQuery Lightbox', 'manage_options', 'jquery-lightbox-options', 'jqlb_options_panel');
|
51 |
}
|
52 |
function jqlb_css(){
|
53 |
if(is_admin() || is_feed()){return;}
|
55 |
}
|
56 |
function jqlb_js() {
|
57 |
if(is_admin() || is_feed()){return;}
|
|
|
|
|
58 |
wp_enqueue_script('jquery', '', array(), '1.4.2', true);
|
59 |
wp_enqueue_script('wp-jquery-lightbox', JQLB_SCRIPT_URL, Array('jquery'), '1.2', true);
|
60 |
wp_localize_script('wp-jquery-lightbox', 'JQLBSettings', array(
|
61 |
'fitToScreen' => get_option('jqlb_resize_on_demand'),
|
62 |
'resizeSpeed' => get_option('jqlb_resize_speed')
|
63 |
+
));
|
64 |
}
|
65 |
/* automatically insert rel="lightbox[nameofpost]" to every image with no manual work.
|
66 |
if there are already rel="lightbox[something]" attributes, they are not clobbered.
|