Easy Image Gallery - Version 1.0.4

Version Description

  • Fix: Images now use the image's caption rather than title field
  • New: Styling for image placeholder as images are being dragged
Download this release

Release Info

Developer sumobi
Plugin Icon 128x128 Easy Image Gallery
Version 1.0.4
Comparing to
See all releases

Code changes from version 1.0.3 to 1.0.4

easy-image-gallery.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Easy Image Gallery
4
  Plugin URI: http://sumobi.com/shop/easy-image-gallery/
5
  Description: An easy to use image gallery with drag & drop re-ordering
6
- Version: 1.0.3
7
  Author: Andrew Munro, Sumobi
8
  Author URI: http://sumobi.com
9
  License: GPL-2.0+
@@ -54,7 +54,7 @@ if ( !class_exists( 'Easy_Image_Gallery' ) ) {
54
  define( 'EASY_IMAGE_GALLERY_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
55
 
56
  if ( ! defined( 'EASY_IMAGE_GALLERY_VERSION' ) )
57
- define( 'EASY_IMAGE_GALLERY_VERSION', '1.0' );
58
 
59
  if ( ! defined( 'EASY_IMAGE_GALLERY_INCLUDES' ) )
60
  define( 'EASY_IMAGE_GALLERY_INCLUDES', EASY_IMAGE_GALLERY_DIR . trailingslashit( 'includes' ) );
3
  Plugin Name: Easy Image Gallery
4
  Plugin URI: http://sumobi.com/shop/easy-image-gallery/
5
  Description: An easy to use image gallery with drag & drop re-ordering
6
+ Version: 1.0.4
7
  Author: Andrew Munro, Sumobi
8
  Author URI: http://sumobi.com
9
  License: GPL-2.0+
54
  define( 'EASY_IMAGE_GALLERY_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
55
 
56
  if ( ! defined( 'EASY_IMAGE_GALLERY_VERSION' ) )
57
+ define( 'EASY_IMAGE_GALLERY_VERSION', '1.0.4' );
58
 
59
  if ( ! defined( 'EASY_IMAGE_GALLERY_INCLUDES' ) )
60
  define( 'EASY_IMAGE_GALLERY_INCLUDES', EASY_IMAGE_GALLERY_DIR . trailingslashit( 'includes' ) );
includes/metabox.php CHANGED
@@ -157,7 +157,7 @@ function easy_image_gallery_metabox() {
157
  forceHelperSize: false,
158
  helper: 'clone',
159
  opacity: 0.65,
160
- placeholder: 'wc-metabox-sortable-placeholder',
161
  start:function(event,ui){
162
  ui.item.css('background-color','#f6f6f6');
163
  },
157
  forceHelperSize: false,
158
  helper: 'clone',
159
  opacity: 0.65,
160
+ placeholder: 'eig-metabox-sortable-placeholder',
161
  start:function(event,ui){
162
  ui.item.css('background-color','#f6f6f6');
163
  },
includes/scripts.php CHANGED
@@ -174,6 +174,10 @@ function easy_image_gallery_admin_css() { ?>
174
  box-shadow: none;
175
  }
176
 
 
 
 
 
177
  .gallery_images .attachment.details > div {
178
  width: 150px;
179
  height: 150px;
174
  box-shadow: none;
175
  }
176
 
177
+ .eig-metabox-sortable-placeholder {
178
+ background: #DFDFDF;
179
+ }
180
+
181
  .gallery_images .attachment.details > div {
182
  width: 150px;
183
  height: 150px;
includes/template-functions.php CHANGED
@@ -282,7 +282,6 @@ function easy_image_gallery() {
282
  if ( $attachment_ids ) { ?>
283
 
284
  <?php
285
- global $post;
286
 
287
  $has_gallery_images = get_post_meta( get_the_ID(), '_easy_image_gallery', true );
288
 
@@ -324,7 +323,8 @@ function easy_image_gallery() {
324
 
325
  $image = wp_get_attachment_image( $attachment_id, apply_filters( 'thumbnail_image_size', 'thumbnail' ), '', array( 'alt' => trim( strip_tags( get_post_meta( $attachment_id, '_wp_attachment_image_alt', true ) ) ) ) );
326
 
327
- $image_title = esc_attr( get_the_title( $attachment_id ) );
 
328
  $image_class = esc_attr( implode( ' ', $classes ) );
329
 
330
  $lightbox = easy_image_gallery_get_lightbox();
@@ -332,11 +332,11 @@ function easy_image_gallery() {
332
  $rel = easy_image_gallery_count_images() > 1 ? 'rel="'. $lightbox .'[group]"' : 'rel="'. $lightbox .'"';
333
 
334
  if ( easy_image_gallery_has_linked_images() )
335
- $html = sprintf( '<li><a %s href="%s" class="%s" title="%s"><i class="icon-view"></i><span class="overlay"></span>%s</a></li>', $rel, $image_link, $image_class, $image_title, $image );
336
  else
337
  $html = sprintf( '<li>%s</li>', $image );
338
 
339
- echo apply_filters( 'easy_image_gallery_html', $html, $rel, $image_link, $image_class, $image_title, $image, $attachment_id, $post->ID );
340
  }
341
  ?>
342
  </ul>
282
  if ( $attachment_ids ) { ?>
283
 
284
  <?php
 
285
 
286
  $has_gallery_images = get_post_meta( get_the_ID(), '_easy_image_gallery', true );
287
 
323
 
324
  $image = wp_get_attachment_image( $attachment_id, apply_filters( 'thumbnail_image_size', 'thumbnail' ), '', array( 'alt' => trim( strip_tags( get_post_meta( $attachment_id, '_wp_attachment_image_alt', true ) ) ) ) );
325
 
326
+ $image_caption = get_post( $attachment_id )->post_excerpt ? get_post( $attachment_id )->post_excerpt : '';
327
+
328
  $image_class = esc_attr( implode( ' ', $classes ) );
329
 
330
  $lightbox = easy_image_gallery_get_lightbox();
332
  $rel = easy_image_gallery_count_images() > 1 ? 'rel="'. $lightbox .'[group]"' : 'rel="'. $lightbox .'"';
333
 
334
  if ( easy_image_gallery_has_linked_images() )
335
+ $html = sprintf( '<li><a %s href="%s" class="%s" title="%s"><i class="icon-view"></i><span class="overlay"></span>%s</a></li>', $rel, $image_link, $image_class, $image_caption, $image );
336
  else
337
  $html = sprintf( '<li>%s</li>', $image );
338
 
339
+ echo apply_filters( 'easy_image_gallery_html', $html, $rel, $image_link, $image_class, $image_caption, $image, $attachment_id, $post->ID );
340
  }
341
  ?>
342
  </ul>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: image gallery, image, galleries, simple, easy, sumobi
5
  Requires at least: 3.5
6
  Tested up to: 3.6
7
- Stable tag: 1.0.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -99,6 +99,11 @@ If you use the template tag above, you will need remove the default content filt
99
 
100
  == Changelog ==
101
 
 
 
 
 
 
102
  = 1.0.3 =
103
 
104
  * Fix: jQuery script that calls light box was being loaded when there were no gallery images
@@ -120,6 +125,9 @@ If you use the template tag above, you will need remove the default content filt
120
 
121
  == Upgrade Notice ==
122
 
 
 
 
123
  = 1.0.3 =
124
  Fixes minor bug where JS was loaded onto page when there is no gallery
125
 
4
  Tags: image gallery, image, galleries, simple, easy, sumobi
5
  Requires at least: 3.5
6
  Tested up to: 3.6
7
+ Stable tag: 1.0.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
99
 
100
  == Changelog ==
101
 
102
+ = 1.0.4 =
103
+
104
+ * Fix: Images now use the image's caption rather than title field
105
+ * New: Styling for image placeholder as images are being dragged
106
+
107
  = 1.0.3 =
108
 
109
  * Fix: jQuery script that calls light box was being loaded when there were no gallery images
125
 
126
  == Upgrade Notice ==
127
 
128
+ = 1.0.4 =
129
+ Images now use the image's caption rather than title field
130
+
131
  = 1.0.3 =
132
  Fixes minor bug where JS was loaded onto page when there is no gallery
133