Galleries by Angie Makes - Version 1.26

Version Description

Download this release

Release Info

Developer cbaldelomar
Plugin Icon wp plugin Galleries by Angie Makes
Version 1.26
Comparing to
See all releases

Code changes from version 1.25 to 1.26

Files changed (4) hide show
  1. README.md +4 -0
  2. includes/functions.php +16 -5
  3. readme.txt +4 -0
  4. wc-gallery.php +2 -2
README.md CHANGED
@@ -46,6 +46,10 @@ Insert a gallery through your dashboard. You will see extra dropdown settings wh
46
 
47
  ## Changelog ##
48
 
 
 
 
 
49
  ### Version 1.25
50
 
51
  * Now wrapping caption with href value in image links
46
 
47
  ## Changelog ##
48
 
49
+ ### Version 1.26
50
+
51
+ * Added position number and attachment id class name to gallery items
52
+
53
  ### Version 1.25
54
 
55
  * Now wrapping caption with href value in image links
includes/functions.php CHANGED
@@ -193,6 +193,8 @@ function wc_gallery_shortcode($blank, $attr) {
193
 
194
  list( $attachments, $links ) = wc_gallery_seperate_attachments_links( $attachments, $display );
195
 
 
 
196
  foreach ( $attachments as $id => $attachment ) {
197
  if ( ! $img = wp_get_attachment_image_src( $id, $size ) )
198
  continue;
@@ -223,7 +225,7 @@ function wc_gallery_shortcode($blank, $attr) {
223
  $orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';
224
 
225
  $output .= "
226
- <li class='gallery-item wcflex-slide-item'>
227
  <div class='gallery-icon {$orientation}'>
228
  $image_output
229
  </div>";
@@ -236,6 +238,8 @@ function wc_gallery_shortcode($blank, $attr) {
236
  </div>";
237
  }
238
  $output .= "</li>";
 
 
239
  }
240
  $output .= "</ul></div>\n";
241
  // End of Flex Slider
@@ -264,7 +268,7 @@ function wc_gallery_shortcode($blank, $attr) {
264
  if ( isset( $image_meta['height'], $image_meta['width'] ) )
265
  $orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';
266
 
267
- $output .= "<div class='gallery-item gallery-item-".$i."'>";
268
  $output .= "<div class='gallery-block'>";
269
  $output .= "
270
  <div class='gallery-icon {$orientation}'>
@@ -283,6 +287,7 @@ function wc_gallery_shortcode($blank, $attr) {
283
  $output .= "</div>";
284
  $output .= "</div>";
285
  $i++;
 
286
  }
287
 
288
  $output .= "</div>\n";
@@ -303,6 +308,7 @@ function wc_gallery_shortcode($blank, $attr) {
303
  $output .= "<div id='$selector' class='owl-carousel' data-gutter-width='".$gutterwidth."' data-columns='".$columns."' data-hide-controls='".$hidecontrols."'>";
304
 
305
  $i = 0;
 
306
  foreach ( $attachments as $id => $attachment ) {
307
  if ( ! $img = wp_get_attachment_image_src( $id, $size ) )
308
  continue;
@@ -333,10 +339,10 @@ function wc_gallery_shortcode($blank, $attr) {
333
  $orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';
334
 
335
  if ( 'owlautowidth' == $display ) {
336
- $output .= "<div class='gallery-item item' style='width:".$width."px'>";
337
  }
338
  else {
339
- $output .= "<div class='gallery-item item'>";
340
  }
341
 
342
  $output .= "<div class='gallery-icon {$orientation}'>$image_output</div>";
@@ -350,6 +356,8 @@ function wc_gallery_shortcode($blank, $attr) {
350
  </div>";
351
  }
352
  $output .= "</div>";
 
 
353
  }
354
 
355
  $output .= "</div></div>\n";
@@ -372,6 +380,7 @@ function wc_gallery_shortcode($blank, $attr) {
372
  $output = "<div id='$selector' data-gutter-width='".$gutterwidth."' data-columns='".$columns."' class='{$class}'>";
373
 
374
  $i = 0;
 
375
  foreach ( $attachments as $id => $attachment ) {
376
  if ( $customlink ) {
377
  $image_output = wc_gallery_get_attachment_link( $id, $size, false, false, false, $targetsize, $customlink, $link_target );
@@ -392,7 +401,7 @@ function wc_gallery_shortcode($blank, $attr) {
392
  if ( isset( $image_meta['height'], $image_meta['width'] ) )
393
  $orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';
394
 
395
- $output .= "<div class='gallery-item'>";
396
  $output .= "
397
  <div class='gallery-icon {$orientation}'>
398
  $image_output
@@ -406,6 +415,8 @@ function wc_gallery_shortcode($blank, $attr) {
406
  </div>";
407
  }
408
  $output .= "</div>";
 
 
409
  }
410
 
411
  $output .= "</div>\n";
193
 
194
  list( $attachments, $links ) = wc_gallery_seperate_attachments_links( $attachments, $display );
195
 
196
+ $pos = 1;
197
+
198
  foreach ( $attachments as $id => $attachment ) {
199
  if ( ! $img = wp_get_attachment_image_src( $id, $size ) )
200
  continue;
225
  $orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';
226
 
227
  $output .= "
228
+ <li class='gallery-item gallery-item-position-".$pos." gallery-item-attachment-".$id." wcflex-slide-item'>
229
  <div class='gallery-icon {$orientation}'>
230
  $image_output
231
  </div>";
238
  </div>";
239
  }
240
  $output .= "</li>";
241
+
242
+ $pos++;
243
  }
244
  $output .= "</ul></div>\n";
245
  // End of Flex Slider
268
  if ( isset( $image_meta['height'], $image_meta['width'] ) )
269
  $orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';
270
 
271
+ $output .= "<div class='gallery-item gallery-item-".$i." gallery-item-position-".$pos." gallery-item-attachment-".$id."'>";
272
  $output .= "<div class='gallery-block'>";
273
  $output .= "
274
  <div class='gallery-icon {$orientation}'>
287
  $output .= "</div>";
288
  $output .= "</div>";
289
  $i++;
290
+ $pos++;
291
  }
292
 
293
  $output .= "</div>\n";
308
  $output .= "<div id='$selector' class='owl-carousel' data-gutter-width='".$gutterwidth."' data-columns='".$columns."' data-hide-controls='".$hidecontrols."'>";
309
 
310
  $i = 0;
311
+ $pos = 1;
312
  foreach ( $attachments as $id => $attachment ) {
313
  if ( ! $img = wp_get_attachment_image_src( $id, $size ) )
314
  continue;
339
  $orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';
340
 
341
  if ( 'owlautowidth' == $display ) {
342
+ $output .= "<div class='gallery-item item gallery-item-position-".$pos." gallery-item-attachment-".$id."' style='width:".$width."px'>";
343
  }
344
  else {
345
+ $output .= "<div class='gallery-item item gallery-item-position-".$pos." gallery-item-attachment-".$id."'>";
346
  }
347
 
348
  $output .= "<div class='gallery-icon {$orientation}'>$image_output</div>";
356
  </div>";
357
  }
358
  $output .= "</div>";
359
+
360
+ $pos++;
361
  }
362
 
363
  $output .= "</div></div>\n";
380
  $output = "<div id='$selector' data-gutter-width='".$gutterwidth."' data-columns='".$columns."' class='{$class}'>";
381
 
382
  $i = 0;
383
+ $pos = 1;
384
  foreach ( $attachments as $id => $attachment ) {
385
  if ( $customlink ) {
386
  $image_output = wc_gallery_get_attachment_link( $id, $size, false, false, false, $targetsize, $customlink, $link_target );
401
  if ( isset( $image_meta['height'], $image_meta['width'] ) )
402
  $orientation = ( $image_meta['height'] > $image_meta['width'] ) ? 'portrait' : 'landscape';
403
 
404
+ $output .= "<div class='gallery-item gallery-item-position-".$pos." gallery-item-attachment-".$id."'>";
405
  $output .= "
406
  <div class='gallery-icon {$orientation}'>
407
  $image_output
415
  </div>";
416
  }
417
  $output .= "</div>";
418
+
419
+ $pos++;
420
  }
421
 
422
  $output .= "</div>\n";
readme.txt CHANGED
@@ -46,6 +46,10 @@ Insert a gallery through your dashboard. You will see extra dropdown settings wh
46
 
47
  == Changelog ==
48
 
 
 
 
 
49
  ### Version 1.25
50
 
51
  * Now wrapping caption with href value in image links
46
 
47
  == Changelog ==
48
 
49
+ ### Version 1.26
50
+
51
+ * Added position number and attachment id class name to gallery items
52
+
53
  ### Version 1.25
54
 
55
  * Now wrapping caption with href value in image links
wc-gallery.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://wordpresscanvas.com/features/gallery/
5
  Description: Extend WordPress galleries to display masonry gallery, carousel gallery, and slider gallery
6
  Author: Chris Baldelomar
7
  Author URI: http://webplantmedia.com/
8
- Version: 1.25
9
  License: GPLv2 or later
10
  */
11
 
@@ -13,7 +13,7 @@ function wc_gallery_using_woocommerce() {
13
  return in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) );
14
  }
15
 
16
- define( 'WC_GALLERY_VERSION', '1.25' );
17
  define( 'WC_GALLERY_PREFIX', 'wc_gallery_' );
18
  define( '_WC_GALLERY_PREFIX', '_wc_gallery_' );
19
  define( 'WC_GALLERY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
5
  Description: Extend WordPress galleries to display masonry gallery, carousel gallery, and slider gallery
6
  Author: Chris Baldelomar
7
  Author URI: http://webplantmedia.com/
8
+ Version: 1.26
9
  License: GPLv2 or later
10
  */
11
 
13
  return in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) );
14
  }
15
 
16
+ define( 'WC_GALLERY_VERSION', '1.26' );
17
  define( 'WC_GALLERY_PREFIX', 'wc_gallery_' );
18
  define( '_WC_GALLERY_PREFIX', '_wc_gallery_' );
19
  define( 'WC_GALLERY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );