Lightbox Gallery - Version 0.8.2

Version Description

  • CSS loading in a child theme.
Download this release

Release Info

Developer Hiroaki Miyashita
Plugin Icon wp plugin Lightbox Gallery
Version 0.8.2
Comparing to
See all releases

Code changes from version 0.8.1 to 0.8.2

Files changed (2) hide show
  1. lightbox-gallery.php +8 -8
  2. readme.txt +11 -7
lightbox-gallery.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Lightbox Gallery
4
  Plugin URI: http://wpgogo.com/development/lightbox-gallery.html
5
  Description: The Lightbox Gallery plugin changes the view of galleries to the lightbox.
6
  Author: Hiroaki Miyashita
7
- Version: 0.8.1
8
  Author URI: http://wpgogo.com/
9
  */
10
 
@@ -103,7 +103,7 @@ function lightbox_gallery_wp_head() {
103
 
104
  if ( !is_admin() && $flag ) {
105
  if ( empty($options['global_settings']['lightbox_gallery_disable_lightbox_gallery_css']) ) :
106
- if (@file_exists(TEMPLATEPATH.'/lightbox-gallery.css')) {
107
  echo '<link rel="stylesheet" href="'.get_stylesheet_directory_uri().'/lightbox-gallery.css" type="text/css" />'."\n";
108
  } else {
109
  echo '<link rel="stylesheet" type="text/css" href="' . get_option('siteurl') . '/' . PLUGINDIR . '/' . $plugin_dir . '/lightbox-gallery.css" />'."\n";
@@ -166,13 +166,13 @@ function lightbox_gallery_wp_print_scripts() {
166
  if ( $options['global_settings']['lightbox_gallery_loading_type'] == 'highslide' ) :
167
  if ( file_exists(ABSPATH . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/highslide.js') ) :
168
  wp_enqueue_script( 'highslide', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/highslide.js', false, '', $in_footer );
169
- elseif ( file_exists(TEMPLATEPATH.'/highslide.js') ) :
170
  wp_enqueue_script( 'highslide', WP_CONTENT_DIR . '/themes/' . $template . '/highslide.js', array('jquery'), '', $in_footer );
171
  endif;
172
  elseif ( $options['global_settings']['lightbox_gallery_loading_type'] == 'lightbox' ) :
173
  if ( file_exists(ABSPATH . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.lightbox.js') ) :
174
  wp_enqueue_script( 'lightbox', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.lightbox.js', array('jquery'), '', $in_footer );
175
- elseif ( file_exists(TEMPLATEPATH.'/jquery.lightbox.js') ) :
176
  wp_enqueue_script( 'lightbox', WP_CONTENT_DIR . '/themes/' . $template . '/jquery.lightbox.js', array('jquery'), '', $in_footer );
177
  endif;
178
  wp_enqueue_script( 'dimensions', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.dimensions.js', array('jquery'), '', $in_footer );
@@ -181,7 +181,7 @@ function lightbox_gallery_wp_print_scripts() {
181
  wp_enqueue_script( 'colorbox', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.colorbox.js', array('jquery'), '', $in_footer );
182
  endif;
183
  wp_enqueue_script( 'tooltip', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.tooltip.js', array('jquery'), '', $in_footer );
184
- if ( @file_exists(TEMPLATEPATH.'/lightbox-gallery.js') ) :
185
  wp_enqueue_script( 'lightbox-gallery', '/wp-content/themes/' . $template . '/lightbox-gallery.js', array('jquery'), '', $in_footer );
186
  else :
187
  wp_enqueue_script( 'lightbox-gallery', '/' . PLUGINDIR . '/' . $plugin_dir . '/lightbox-gallery.js', array('jquery'), '', $in_footer );
@@ -312,7 +312,7 @@ function lightbox_gallery_admin() {
312
  <p><label for="lightbox_gallery_loading_type"><?php _e('Choose the gallery loading type', 'lightbox-gallery'); ?></label>:<br />
313
  <label><input type="radio" name="lightbox_gallery_loading_type" id="lightbox_gallery_loading_type" value="colorbox"<?php checked('colorbox', $options['global_settings']['lightbox_gallery_loading_type']); ?> /> <?php _e('Colorbox', 'lightbox-gallery'); ?></label><br />
314
  <?php
315
- if ( file_exists(ABSPATH . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.lightbox.js') || file_exists(TEMPLATEPATH.'/jquery.lightbox.js') ) :
316
  ?>
317
  <label><input type="radio" name="lightbox_gallery_loading_type" id="lightbox_gallery_loading_type" value="lightbox"<?php checked('lightbox', $options['global_settings']['lightbox_gallery_loading_type']); ?> /> <?php _e('Lightbox', 'lightbox-gallery'); ?></label><br />
318
  <?php
@@ -323,7 +323,7 @@ function lightbox_gallery_admin() {
323
  </ul>
324
  <?php
325
  endif;
326
- if ( file_exists(ABSPATH . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/highslide.js') || file_exists(TEMPLATEPATH.'/highslide.js') ) :
327
  ?>
328
  <label><input type="radio" name="lightbox_gallery_loading_type" id="lightbox_gallery_loading_type" value="highslide"<?php checked('highslide', $options['global_settings']['lightbox_gallery_loading_type']); ?> /> <?php _e('Highslide JS', 'lightbox-gallery'); ?></label><br />
329
  <ul style="list-style-type:disc; padding-left:1.2em;">
@@ -412,7 +412,7 @@ function lightbox_gallery_admin() {
412
 
413
  <div style="width:24%; float:right;">
414
  <?php
415
- if ( (!file_exists(ABSPATH . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.lightbox.js') && !file_exists(TEMPLATEPATH.'/jquery.lightbox.js')) || (!file_exists(ABSPATH . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/highslide.js') && !file_exists(TEMPLATEPATH.'/highslide.js')) ) :
416
  ?>
417
  <div class="postbox" style="min-width:200px;">
418
  <div class="handlediv" title="<?php _e('Click to toggle', 'lightbox-gallery'); ?>"><br /></div>
4
  Plugin URI: http://wpgogo.com/development/lightbox-gallery.html
5
  Description: The Lightbox Gallery plugin changes the view of galleries to the lightbox.
6
  Author: Hiroaki Miyashita
7
+ Version: 0.8.2
8
  Author URI: http://wpgogo.com/
9
  */
10
 
103
 
104
  if ( !is_admin() && $flag ) {
105
  if ( empty($options['global_settings']['lightbox_gallery_disable_lightbox_gallery_css']) ) :
106
+ if (@file_exists(STYLESHEETPATH.'/lightbox-gallery.css')) {
107
  echo '<link rel="stylesheet" href="'.get_stylesheet_directory_uri().'/lightbox-gallery.css" type="text/css" />'."\n";
108
  } else {
109
  echo '<link rel="stylesheet" type="text/css" href="' . get_option('siteurl') . '/' . PLUGINDIR . '/' . $plugin_dir . '/lightbox-gallery.css" />'."\n";
166
  if ( $options['global_settings']['lightbox_gallery_loading_type'] == 'highslide' ) :
167
  if ( file_exists(ABSPATH . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/highslide.js') ) :
168
  wp_enqueue_script( 'highslide', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/highslide.js', false, '', $in_footer );
169
+ elseif ( file_exists(STYLESHEETPATH.'/highslide.js') ) :
170
  wp_enqueue_script( 'highslide', WP_CONTENT_DIR . '/themes/' . $template . '/highslide.js', array('jquery'), '', $in_footer );
171
  endif;
172
  elseif ( $options['global_settings']['lightbox_gallery_loading_type'] == 'lightbox' ) :
173
  if ( file_exists(ABSPATH . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.lightbox.js') ) :
174
  wp_enqueue_script( 'lightbox', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.lightbox.js', array('jquery'), '', $in_footer );
175
+ elseif ( file_exists(STYLESHEETPATH.'/jquery.lightbox.js') ) :
176
  wp_enqueue_script( 'lightbox', WP_CONTENT_DIR . '/themes/' . $template . '/jquery.lightbox.js', array('jquery'), '', $in_footer );
177
  endif;
178
  wp_enqueue_script( 'dimensions', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.dimensions.js', array('jquery'), '', $in_footer );
181
  wp_enqueue_script( 'colorbox', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.colorbox.js', array('jquery'), '', $in_footer );
182
  endif;
183
  wp_enqueue_script( 'tooltip', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.tooltip.js', array('jquery'), '', $in_footer );
184
+ if ( @file_exists(STYLESHEETPATH.'/lightbox-gallery.js') ) :
185
  wp_enqueue_script( 'lightbox-gallery', '/wp-content/themes/' . $template . '/lightbox-gallery.js', array('jquery'), '', $in_footer );
186
  else :
187
  wp_enqueue_script( 'lightbox-gallery', '/' . PLUGINDIR . '/' . $plugin_dir . '/lightbox-gallery.js', array('jquery'), '', $in_footer );
312
  <p><label for="lightbox_gallery_loading_type"><?php _e('Choose the gallery loading type', 'lightbox-gallery'); ?></label>:<br />
313
  <label><input type="radio" name="lightbox_gallery_loading_type" id="lightbox_gallery_loading_type" value="colorbox"<?php checked('colorbox', $options['global_settings']['lightbox_gallery_loading_type']); ?> /> <?php _e('Colorbox', 'lightbox-gallery'); ?></label><br />
314
  <?php
315
+ if ( file_exists(ABSPATH . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.lightbox.js') || file_exists(STYLESHEETPATH.'/jquery.lightbox.js') ) :
316
  ?>
317
  <label><input type="radio" name="lightbox_gallery_loading_type" id="lightbox_gallery_loading_type" value="lightbox"<?php checked('lightbox', $options['global_settings']['lightbox_gallery_loading_type']); ?> /> <?php _e('Lightbox', 'lightbox-gallery'); ?></label><br />
318
  <?php
323
  </ul>
324
  <?php
325
  endif;
326
+ if ( file_exists(ABSPATH . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/highslide.js') || file_exists(STYLESHEETPATH.'/highslide.js') ) :
327
  ?>
328
  <label><input type="radio" name="lightbox_gallery_loading_type" id="lightbox_gallery_loading_type" value="highslide"<?php checked('highslide', $options['global_settings']['lightbox_gallery_loading_type']); ?> /> <?php _e('Highslide JS', 'lightbox-gallery'); ?></label><br />
329
  <ul style="list-style-type:disc; padding-left:1.2em;">
412
 
413
  <div style="width:24%; float:right;">
414
  <?php
415
+ if ( (!file_exists(ABSPATH . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.lightbox.js') && !file_exists(STYLESHEETPATH.'/jquery.lightbox.js')) || (!file_exists(ABSPATH . '/' . PLUGINDIR . '/' . $plugin_dir . '/js/highslide.js') && !file_exists(STYLESHEETPATH.'/highslide.js')) ) :
416
  ?>
417
  <div class="postbox" style="min-width:200px;">
418
  <div class="handlediv" title="<?php _e('Click to toggle', 'lightbox-gallery'); ?>"><br /></div>
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Hiroaki Miyashita
3
  Donate link: http://wpgogo.com/development/lightbox-gallery.html
4
  Tags: lightbox, gallery, galleries, image, images, album, photo, photos, picture, pictures, jQuery, Highslide, Colorbox
5
  Requires at least: 2.5
6
- Tested up to: 4.1.1
7
- Stable tag: 0.8.1
8
  License: GPLv2 or later
9
 
10
  The Lightbox Gallery plugin changes the view of galleries to the lightbox.
@@ -55,15 +55,16 @@ If you have translated into your language, please let me know.
55
 
56
  == Installation ==
57
 
58
- 1. Edit the `lightbox-gallery.js` and check the path of line 2 according to your settings.
59
- 2. Copy the `lightbox-gallery` directory into your `wp-content/plugins` directory
60
- 3. Activate the plugin through the 'Plugins' menu in WordPress
61
- 4. There may exist localized images in 'images' directory. Replace default images with them.
62
- 5. That's it! :)
63
 
64
  Lightbox Gallery will load 'lightbox-gallery.css' and 'lightbox-gallery.js' from your theme's directory if they exist.
65
  If they don't exist, they will just load the default 'lightbox-gallery.css' and 'lightbox-gallery.js' that come with Lightbox Gallery. This will allow you to upgrade Lightbox Gallery without worrying about overwriting your lightbox gallery styles that you have created.
66
 
 
 
 
67
  == Frequently Asked Questions ==
68
  * How can I make regular images appear in a lightbox without [gallery] shortcode?
69
 
@@ -137,6 +138,9 @@ If you would like not to show the navigation, set `0`. The default is `1`.
137
 
138
  == Changelog ==
139
 
 
 
 
140
  = 0.8.1 =
141
  * Backward compatibility: caption loading.
142
  * Code cleaning.
3
  Donate link: http://wpgogo.com/development/lightbox-gallery.html
4
  Tags: lightbox, gallery, galleries, image, images, album, photo, photos, picture, pictures, jQuery, Highslide, Colorbox
5
  Requires at least: 2.5
6
+ Tested up to: 4.2
7
+ Stable tag: 0.8.2
8
  License: GPLv2 or later
9
 
10
  The Lightbox Gallery plugin changes the view of galleries to the lightbox.
55
 
56
  == Installation ==
57
 
58
+ 1. Activate the plugin through the 'Plugins' menu in WordPress
59
+ 2. Just upload images and write down the [gallery] shortcode in the post content.
60
+ 3. That's it! :)
 
 
61
 
62
  Lightbox Gallery will load 'lightbox-gallery.css' and 'lightbox-gallery.js' from your theme's directory if they exist.
63
  If they don't exist, they will just load the default 'lightbox-gallery.css' and 'lightbox-gallery.js' that come with Lightbox Gallery. This will allow you to upgrade Lightbox Gallery without worrying about overwriting your lightbox gallery styles that you have created.
64
 
65
+ * Edit the `lightbox-gallery.js` and check the path of line 2 according to your settings.
66
+ * There may exist localized images in 'images' directory. Replace default images with them.
67
+
68
  == Frequently Asked Questions ==
69
  * How can I make regular images appear in a lightbox without [gallery] shortcode?
70
 
138
 
139
  == Changelog ==
140
 
141
+ = 0.8.2 =
142
+ * CSS loading in a child theme.
143
+
144
  = 0.8.1 =
145
  * Backward compatibility: caption loading.
146
  * Code cleaning.