WP jQuery Lightbox - Version 1.1

Version Description

  • Honors empty captions.
  • Fixed typos on admin page.
  • (thanks, josephknight! http://tinyurl.com/3677p6r)
Download this release

Release Info

Developer ulfben
Plugin Icon wp plugin WP jQuery Lightbox
Version 1.1
Comparing to
See all releases

Code changes from version 1.0 to 1.1

Files changed (3) hide show
  1. jquery.lightbox.js +3 -1
  2. readme.txt +13 -5
  3. wp-jquery-lightbox.php +7 -7
jquery.lightbox.js CHANGED
@@ -285,7 +285,9 @@
285
  };
286
 
287
  function updateDetails() {
288
- jQuery('#numberDisplay').html('');
 
 
289
  if(opts.imageArray[opts.activeImage][1]){
290
  jQuery('#caption').html(opts.imageArray[opts.activeImage][1]).show();
291
  }
285
  };
286
 
287
  function updateDetails() {
288
+ jQuery('#numberDisplay').html('');
289
+ jQuery('#imageDataContainer').slideDown('fast');
290
+ jQuery('#caption').hide();
291
  if(opts.imageArray[opts.activeImage][1]){
292
  jQuery('#caption').html(opts.imageArray[opts.activeImage][1]).show();
293
  }
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: 2.9.2
7
- Stable tag: 1.0
8
 
9
  A drop in replacement for Lightbox 2 and similar plugins, shedding the bulk of Prototype and Scriptaculous.
10
 
@@ -33,11 +33,11 @@ See the plugin in action here: [http://game.hgo.se/blog/motion-capture/](http://
33
 
34
  1. If you have a set of related images that you would like to group, follow step one but additionally include a group name in the rel attribute. For example:
35
 
36
- `<a href="image-1.jpg" rel="roadtrip[roadtrip]">image #1</a>`
37
 
38
- `<a href="image-2.jpg" rel="roadtrip[roadtrip]">image #2</a>`
39
 
40
- `<a href="image-3.jpg" rel="roadtrip[roadtrip]">image #3</a>`
41
 
42
  Optional: Use the title attribute if you want to show a caption.
43
 
@@ -47,10 +47,18 @@ No limits to the number of image sets per page or how many images are allowed in
47
 
48
  == Changelog ==
49
 
 
 
 
 
 
50
  = 1.0 =
51
  * Release.
52
 
53
  == Upgrade Notice ==
54
 
 
 
 
55
  = 1.0 =
56
  First release.
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.0.1
7
+ Stable tag: 1.1
8
 
9
  A drop in replacement for Lightbox 2 and similar plugins, shedding the bulk of Prototype and Scriptaculous.
10
 
33
 
34
  1. If you have a set of related images that you would like to group, follow step one but additionally include a group name in the rel attribute. For example:
35
 
36
+ `<a href="image-1.jpg" rel="lightbox[roadtrip]">image #1</a>`
37
 
38
+ `<a href="image-2.jpg" rel="lightbox[roadtrip]">image #2</a>`
39
 
40
+ `<a href="image-3.jpg" rel="lightbox[roadtrip]">image #3</a>`
41
 
42
  Optional: Use the title attribute if you want to show a caption.
43
 
47
 
48
  == Changelog ==
49
 
50
+ = 1.1 =
51
+ * Honors empty captions.
52
+ * Fixed typos on admin page.
53
+ * (thanks, josephknight! http://tinyurl.com/3677p6r)
54
+
55
  = 1.0 =
56
  * Release.
57
 
58
  == Upgrade Notice ==
59
 
60
+ = 1.1 =
61
+ Honors empty captions and fixes some typos.
62
+
63
  = 1.0 =
64
  First release.
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.0
7
  Author: Ulf Benjaminsson
8
  Author URI: http://www.ulfben.com
9
  */
@@ -23,7 +23,7 @@ add_filter("plugin_action_links_$plugin", 'jqlb_add_plugin_actions' );
23
  add_filter('the_content', 'jqlb_autoexpand_rel_wlightbox', 99);
24
  add_filter('the_excerpt', 'jqlb_autoexpand_rel_wlightbox', 99);
25
  function jqlb_add_plugin_actions( $links ) { // Add a link to this plugin's settings page
26
- $settings_link = '<a href="/wp-admin/options-general.php?page=jquery-lightbox-options">Settings</a>';
27
  array_unshift( $links, $settings_link );
28
  return $links;
29
  }
@@ -38,14 +38,14 @@ function jqlb_register_menu_item() {
38
  }
39
  function jqlb_css(){
40
  if(is_admin() || is_feed()){return;}
41
- wp_enqueue_style('jquery.lightbox.css', JQLB_STYLE_URL, false, '0.5');
42
  }
43
  function jqlb_js() {
44
  if(is_admin() || is_feed()){return;}
45
  wp_deregister_script('jquery');
46
  wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');
47
  wp_enqueue_script('jquery', '', array(), '1.4.2', true);
48
- wp_enqueue_script('wp-jquery-lightbox', JQLB_SCRIPT_URL, Array('jquery'), '0.5', true);
49
  wp_localize_script('wp-jquery-lightbox', 'JQLBSettings', array(
50
  'fitToScreen' => get_option('jqlb_resize_on_demand'),
51
  'resizeSpeed' => get_option('jqlb_resize_speed')
@@ -109,9 +109,9 @@ function jqlb_options_panel(){
109
  <em>Optional: </em>Use the <code>title</code> attribute if you want to show a caption.
110
  </li>
111
  <li>If you have a set of related images that you would like to group, follow step one but additionally include a group name in the rel attribute. For example:
112
- <pre><code> &lt;a href=&quot;images/image-1.jpg&quot; rel=&quot;roadtrip[roadtrip]&quot;&gt;image #1&lt;/a&gt;
113
- &lt;a href=&quot;images/image-2.jpg&quot; rel=&quot;roadtrip[roadtrip]&quot;&gt;image #2&lt;/a&gt;
114
- &lt;a href=&quot;images/image-3.jpg&quot; rel=&quot;roadtrip[roadtrip]&quot;&gt;image #3&lt;/a&gt;</code></pre>
115
  No limits to the number of image sets per page or how many images are allowed in each set. Go nuts!</li>
116
  <li>You can safely use WordPress image galleries and have them grouped and auto-lightboxed: <code>[gallery link="file"]</code></li>
117
  </ol>
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.1
7
  Author: Ulf Benjaminsson
8
  Author URI: http://www.ulfben.com
9
  */
23
  add_filter('the_content', 'jqlb_autoexpand_rel_wlightbox', 99);
24
  add_filter('the_excerpt', 'jqlb_autoexpand_rel_wlightbox', 99);
25
  function jqlb_add_plugin_actions( $links ) { // Add a link to this plugin's settings page
26
+ $settings_link = '<a href="' . get_option('siteurl') . '/wp-admin/options-general.php?page=jquery-lightbox-options">Settings</a>';
27
  array_unshift( $links, $settings_link );
28
  return $links;
29
  }
38
  }
39
  function jqlb_css(){
40
  if(is_admin() || is_feed()){return;}
41
+ wp_enqueue_style('jquery.lightbox.css', JQLB_STYLE_URL, false, '1.1');
42
  }
43
  function jqlb_js() {
44
  if(is_admin() || is_feed()){return;}
45
  wp_deregister_script('jquery');
46
  wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');
47
  wp_enqueue_script('jquery', '', array(), '1.4.2', true);
48
+ wp_enqueue_script('wp-jquery-lightbox', JQLB_SCRIPT_URL, Array('jquery'), '1.1', true);
49
  wp_localize_script('wp-jquery-lightbox', 'JQLBSettings', array(
50
  'fitToScreen' => get_option('jqlb_resize_on_demand'),
51
  'resizeSpeed' => get_option('jqlb_resize_speed')
109
  <em>Optional: </em>Use the <code>title</code> attribute if you want to show a caption.
110
  </li>
111
  <li>If you have a set of related images that you would like to group, follow step one but additionally include a group name in the rel attribute. For example:
112
+ <pre><code> &lt;a href=&quot;images/image-1.jpg&quot; rel=&quot;lightbox[roadtrip]&quot;&gt;image #1&lt;/a&gt;
113
+ &lt;a href=&quot;images/image-2.jpg&quot; rel=&quot;lightbox[roadtrip]&quot;&gt;image #2&lt;/a&gt;
114
+ &lt;a href=&quot;images/image-3.jpg&quot; rel=&quot;lightbox[roadtrip]&quot;&gt;image #3&lt;/a&gt;</code></pre>
115
  No limits to the number of image sets per page or how many images are allowed in each set. Go nuts!</li>
116
  <li>You can safely use WordPress image galleries and have them grouped and auto-lightboxed: <code>[gallery link="file"]</code></li>
117
  </ol>