Galleries by Angie Makes - Version 1.65

Version Description

Download this release

Release Info

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

Code changes from version 1.64 to 1.65

README.md CHANGED
@@ -67,6 +67,10 @@ For more tutorials on our gallery plugin, go to our knowledge base.
67
 
68
  ## Changelog ##
69
 
 
 
 
 
70
  ### Version 1.64 ###
71
 
72
  * Only load flex slider when more than 1 attachment is in the slider
67
 
68
  ## Changelog ##
69
 
70
+ ### Version 1.65 ###
71
+
72
+ * fixed bug with link to being wrapped around image link caption.
73
+
74
  ### Version 1.64 ###
75
 
76
  * Only load flex slider when more than 1 attachment is in the slider
includes/functions.php CHANGED
@@ -265,12 +265,15 @@ function wc_gallery_shortcode($blank, $attr) {
265
  $caption_text = trim($attachment->post_excerpt);
266
 
267
  if ( ! empty( $caption_text ) ) {
 
 
268
  $output .= "
269
  <div class='wp-caption-text gallery-caption'>
270
  <h3>
271
  " . wptexturize($caption_text) . "
272
  </h3>
273
  </div>";
 
274
  }
275
  $output .= "</div>";
276
  $output .= "</div>";
@@ -507,6 +510,23 @@ function wc_gallery_seperate_attachments_links( $attachments, $display ) {
507
  return array( $attachments, $links );
508
  }
509
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
510
  /**
511
  * Retrieve an attachment page link using an image or icon, if possible.
512
  *
@@ -527,16 +547,7 @@ function wc_gallery_get_attachment_link( $id = 0, $size = 'thumbnail', $permalin
527
  if ( empty( $_post ) || ( 'attachment' != $_post->post_type ) || ! $url = wp_get_attachment_url( $_post->ID ) )
528
  return __( 'Missing Attachment' );
529
 
530
- if ( $customlink ) {
531
- $url = get_post_meta( $_post->ID, _WC_GALLERY_PREFIX . 'custom_image_link', true );
532
- }
533
- else if ( $permalink ) {
534
- $url = get_attachment_link( $_post->ID );
535
- }
536
- else if ( $targetsize ) {
537
- if ( $img = wp_get_attachment_image_src( $_post->ID, $targetsize ) )
538
- $url = $img[0];
539
- }
540
 
541
  $post_title = esc_attr( $_post->post_title );
542
 
265
  $caption_text = trim($attachment->post_excerpt);
266
 
267
  if ( ! empty( $caption_text ) ) {
268
+ $url = wc_gallery_get_attachment_url( $id, true, false, $targetsize );
269
+ $output .= "<a href='".$url."' target='".$link_target."'>";
270
  $output .= "
271
  <div class='wp-caption-text gallery-caption'>
272
  <h3>
273
  " . wptexturize($caption_text) . "
274
  </h3>
275
  </div>";
276
+ $output .= "</a>";
277
  }
278
  $output .= "</div>";
279
  $output .= "</div>";
510
  return array( $attachments, $links );
511
  }
512
 
513
+ function wc_gallery_get_attachment_url( $id, $customlink, $permalink, $targetsize ) {
514
+ $_post = get_post( $id );
515
+
516
+ if ( $customlink ) {
517
+ $url = get_post_meta( $_post->ID, _WC_GALLERY_PREFIX . 'custom_image_link', true );
518
+ }
519
+ else if ( $permalink ) {
520
+ $url = get_attachment_link( $_post->ID );
521
+ }
522
+ else if ( $targetsize ) {
523
+ if ( $img = wp_get_attachment_image_src( $_post->ID, $targetsize ) )
524
+ $url = $img[0];
525
+ }
526
+
527
+ return $url;
528
+ }
529
+
530
  /**
531
  * Retrieve an attachment page link using an image or icon, if possible.
532
  *
547
  if ( empty( $_post ) || ( 'attachment' != $_post->post_type ) || ! $url = wp_get_attachment_url( $_post->ID ) )
548
  return __( 'Missing Attachment' );
549
 
550
+ $url = wc_gallery_get_attachment_url( $id, $customlink, $permalink, $targetsize );
 
 
 
 
 
 
 
 
 
551
 
552
  $post_title = esc_attr( $_post->post_title );
553
 
includes/js/gallery-slider.js CHANGED
@@ -85,22 +85,7 @@
85
  smoothHeight: true,
86
  slideshow: true,
87
  directionNav: showNav,
88
- animation:"slide",
89
- init: function() {
90
- $this.find('.wc-image-links .gallery-item').each( function() {
91
- var $link = $(this);
92
- var $a = $link.find('.gallery-icon a');
93
- if ( 0 < $a.length ) {
94
- var href = $a.attr('href');
95
- if ( 'string' == typeof( href ) ) {
96
- var $caption = $link.find('.gallery-caption');
97
- if ( 0 < $caption.length ) {
98
- $caption.wrap('<a href="'+href+'"></a>');
99
- }
100
- }
101
- }
102
- });
103
- }
104
  });
105
  }
106
  });
85
  smoothHeight: true,
86
  slideshow: true,
87
  directionNav: showNav,
88
+ animation:"slide"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  });
90
  }
91
  });
readme.txt CHANGED
@@ -67,6 +67,10 @@ For more tutorials on our gallery plugin, go to our knowledge base.
67
 
68
  == Changelog ==
69
 
 
 
 
 
70
  = Version 1.64 =
71
 
72
  * Only load flex slider when more than 1 attachment is in the slider
67
 
68
  == Changelog ==
69
 
70
+ = Version 1.65 =
71
+
72
+ * fixed bug with link to being wrapped around image link caption.
73
+
74
  = Version 1.64 =
75
 
76
  * Only load flex slider when more than 1 attachment is in the slider
wc-gallery.php CHANGED
@@ -5,11 +5,11 @@ Plugin URI: http://angiemakes.com/feminine-wordpress-blog-themes-women/
5
  Description: Extend WordPress galleries to display masonry gallery, carousel gallery, and slider gallery
6
  Author: Chris Baldelomar
7
  Author URI: http://angiemakes.com/
8
- Version: 1.64
9
  License: GPLv2 or later
10
  */
11
 
12
- define( 'WC_GALLERY_VERSION', '1.64' );
13
  define( 'WC_GALLERY_PREFIX', 'wc_gallery_' );
14
  define( '_WC_GALLERY_PREFIX', '_wc_gallery_' );
15
  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://angiemakes.com/
8
+ Version: 1.65
9
  License: GPLv2 or later
10
  */
11
 
12
+ define( 'WC_GALLERY_VERSION', '1.65' );
13
  define( 'WC_GALLERY_PREFIX', 'wc_gallery_' );
14
  define( '_WC_GALLERY_PREFIX', '_wc_gallery_' );
15
  define( 'WC_GALLERY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );