WP Gallery Custom Links - Version 1.1.2

Version Description

  • Added a check to prevent javascript from showing up in feeds.
Download this release

Release Info

Developer fourlightsweb
Plugin Icon wp plugin WP Gallery Custom Links
Version 1.1.2
Comparing to
See all releases

Code changes from version 1.1.1 to 1.1.2

Files changed (2) hide show
  1. readme.txt +21 -4
  2. wp-gallery-custom-links.php +14 -10
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: fourlightsweb
3
  Donate link: http://www.fourlightsweb.com/wordpress-plugins/wp-gallery-custom-links/#donate
4
  Tags: gallery links, gallery link, gallery
5
  Requires at least: 3.3.2
6
- Tested up to: 3.4
7
- Stable tag: 1.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -28,9 +28,20 @@ and allow it to function as a regular link.
28
 
29
  == Frequently Asked Questions ==
30
 
31
- = When will you have FAQs? =
32
 
33
- As soon as someone asks me something. :)
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  == Screenshots ==
36
 
@@ -38,6 +49,9 @@ As soon as someone asks me something. :)
38
 
39
  == Changelog ==
40
 
 
 
 
41
  = 1.1.1 =
42
  * Fixed an error that occurred when an images were small enough to only have one size
43
  * Tested with WordPress 3.4
@@ -66,6 +80,9 @@ As soon as someone asks me something. :)
66
 
67
  == Upgrade Notice ==
68
 
 
 
 
69
  = 1.1.1 =
70
  * Fixed an error that occurred when an images were small enough to only have one size
71
  * Tested with WordPress 3.4
3
  Donate link: http://www.fourlightsweb.com/wordpress-plugins/wp-gallery-custom-links/#donate
4
  Tags: gallery links, gallery link, gallery
5
  Requires at least: 3.3.2
6
+ Tested up to: 3.4.1
7
+ Stable tag: 1.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
28
 
29
  == Frequently Asked Questions ==
30
 
31
+ = Will this plugin work with my theme's galleries? =
32
 
33
+ Possibly. WP Gallery Custom Links plugin was designed for use with
34
+ 1) WordPress's [gallery] shortcode and 2) images
35
+ attached to the post/page. Some themes use these features, and others
36
+ have their own proprietary way of saving gallery images and drawing out the gallery.
37
+ Provided your theme meets the criteria above, the plugin *should* work with it.
38
+
39
+ = Will this plugin work with NextGen galleries? =
40
+
41
+ No, this plugin is *not* compatible with NextGen galleries. WP Gallery Custom Links was
42
+ designed for use with 1) WordPress's [gallery] shortcode and 2) images
43
+ attached to the post/page. NextGen galleries uses its own [nggallery] etc. shortcodes
44
+ that function outside of the WordPress [gallery] shortcode.
45
 
46
  == Screenshots ==
47
 
49
 
50
  == Changelog ==
51
 
52
+ = 1.1.2 =
53
+ * Added a check to prevent javascript from showing up in feeds.
54
+
55
  = 1.1.1 =
56
  * Fixed an error that occurred when an images were small enough to only have one size
57
  * Tested with WordPress 3.4
80
 
81
  == Upgrade Notice ==
82
 
83
+ = 1.1.2 =
84
+ * Added a check to prevent javascript from showing up in feeds.
85
+
86
  = 1.1.1 =
87
  * Fixed an error that occurred when an images were small enough to only have one size
88
  * Tested with WordPress 3.4
wp-gallery-custom-links.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Gallery Custom Links
4
  Plugin URI: http://www.fourlightsweb.com/wordpress-plugins/wp-gallery-custom-links/
5
  Description: Specifiy custom links for WordPress gallery images (instead of attachment or file only).
6
- Version: 1.1.1
7
  Author: Four Lights Web Development
8
  Author URI: http://www.fourlightsweb.com
9
  License: GPL2
@@ -151,15 +151,19 @@ class WPGalleryCustomLinks {
151
  } // End foreach post attachment
152
 
153
  // Javascript to override lightboxes
154
- $output .= "<script type=\"text/javascript\">\n";
155
- $output .= "/* <![CDATA[ */\n";
156
- $output .= "jQuery(document).ready(function () {\n";
157
- $output .= " jQuery('a.no-lightbox').unbind();\n";
158
- $output .= " jQuery('a.no-lightbox').off();\n";
159
- $output .= " jQuery('a.no-lightbox').click(function(){window.location=this.href; return false;});\n";
160
- $output .= "});";
161
- $output .= "/* ]]> */\n";
162
- $output .= "</script>";
 
 
 
 
163
 
164
  return $output;
165
  } // End function apply_filter_post_gallery()
3
  Plugin Name: WP Gallery Custom Links
4
  Plugin URI: http://www.fourlightsweb.com/wordpress-plugins/wp-gallery-custom-links/
5
  Description: Specifiy custom links for WordPress gallery images (instead of attachment or file only).
6
+ Version: 1.1.2
7
  Author: Four Lights Web Development
8
  Author URI: http://www.fourlightsweb.com
9
  License: GPL2
151
  } // End foreach post attachment
152
 
153
  // Javascript to override lightboxes
154
+ // Note: Make sure this don't go into feeds, since it could
155
+ // cause Mailchimp etc. to not work properly.
156
+ if( ! is_feed() ) {
157
+ $output .= "<script type=\"text/javascript\">\n";
158
+ $output .= "/* <![CDATA[ */\n";
159
+ $output .= "jQuery(document).ready(function () {\n";
160
+ $output .= " jQuery('a.no-lightbox').unbind();\n";
161
+ $output .= " jQuery('a.no-lightbox').off();\n";
162
+ $output .= " jQuery('a.no-lightbox').click(function(){window.location=this.href; return false;});\n";
163
+ $output .= "});";
164
+ $output .= "/* ]]> */\n";
165
+ $output .= "</script>";
166
+ } // End if it's not a feed
167
 
168
  return $output;
169
  } // End function apply_filter_post_gallery()