WP Gallery Custom Links - Version 1.10.3

Version Description

  • Added a "Do Not Change" default target option to improve performance by reducing the number of regexes to apply "self" on every gallery item. If your theme opens all gallery items in a new window by default and you prefer to keep them in the same window, you will need to add openall_in_same_window="true" to your gallery shortcode.
Download this release

Release Info

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

Code changes from version 1.10.2 to 1.10.3

languages/wp-gallery-custom-links.pot CHANGED
@@ -1,14 +1,15 @@
1
- # Copyright (C) 2014 WP Gallery Custom Links
2
  # This file is distributed under the same license as the WP Gallery Custom Links package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WP Gallery Custom Links 1.10.1\n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-gallery-custom-links\n"
7
- "POT-Creation-Date: 2014-05-22 16:39:23+00:00\n"
 
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
@@ -33,37 +34,41 @@ msgid ""
33
  msgstr ""
34
 
35
  #: wp-gallery-custom-links.php:100
36
- msgid "Same Window"
37
  msgstr ""
38
 
39
  #: wp-gallery-custom-links.php:101
 
 
 
 
40
  msgid "New Window"
41
  msgstr ""
42
 
43
- #: wp-gallery-custom-links.php:107
44
  msgid "Gallery Link OnClick Effect"
45
  msgstr ""
46
 
47
- #: wp-gallery-custom-links.php:110
48
  msgid ""
49
  "Lightbox and other OnClick events are removed by default from this image in "
50
  "galleries. This setting will only be applied to this image in galleries if "
51
  "this image has a Gallery Link URL specified."
52
  msgstr ""
53
 
54
- #: wp-gallery-custom-links.php:116
55
  msgid "Remove"
56
  msgstr ""
57
 
58
- #: wp-gallery-custom-links.php:117
59
  msgid "Keep"
60
  msgstr ""
61
 
62
- #: wp-gallery-custom-links.php:122
63
  msgid "Gallery Link Additional CSS Classes"
64
  msgstr ""
65
 
66
- #: wp-gallery-custom-links.php:125
67
  msgid ""
68
  "Additional CSS classes specified here will be applied to the "
69
  "<strong><em>link</em></strong> around this image in galleries regardless of "
1
+ # Copyright (C) 2015 WP Gallery Custom Links
2
  # This file is distributed under the same license as the WP Gallery Custom Links package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WP Gallery Custom Links 1.10.3\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/wp-gallery-custom-"
7
+ "links\n"
8
+ "POT-Creation-Date: 2015-04-23 16:20:16+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
 
34
  msgstr ""
35
 
36
  #: wp-gallery-custom-links.php:100
37
+ msgid "Do Not Change"
38
  msgstr ""
39
 
40
  #: wp-gallery-custom-links.php:101
41
+ msgid "Same Window"
42
+ msgstr ""
43
+
44
+ #: wp-gallery-custom-links.php:102
45
  msgid "New Window"
46
  msgstr ""
47
 
48
+ #: wp-gallery-custom-links.php:108
49
  msgid "Gallery Link OnClick Effect"
50
  msgstr ""
51
 
52
+ #: wp-gallery-custom-links.php:111
53
  msgid ""
54
  "Lightbox and other OnClick events are removed by default from this image in "
55
  "galleries. This setting will only be applied to this image in galleries if "
56
  "this image has a Gallery Link URL specified."
57
  msgstr ""
58
 
59
+ #: wp-gallery-custom-links.php:117
60
  msgid "Remove"
61
  msgstr ""
62
 
63
+ #: wp-gallery-custom-links.php:118
64
  msgid "Keep"
65
  msgstr ""
66
 
67
+ #: wp-gallery-custom-links.php:123
68
  msgid "Gallery Link Additional CSS Classes"
69
  msgstr ""
70
 
71
+ #: wp-gallery-custom-links.php:126
72
  msgid ""
73
  "Additional CSS classes specified here will be applied to the "
74
  "<strong><em>link</em></strong> around this image in galleries regardless of "
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.fourlightsweb.com/wordpress-plugins/wp-gallery-custom-li
4
  Tags: gallery links, gallery link, gallery
5
  Requires at least: 3.3.1
6
  Tested up to: 4.2
7
- Stable tag: 1.10.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -147,6 +147,9 @@ accomplish this, which is outside the scope of this plugin.
147
 
148
  == Changelog ==
149
 
 
 
 
150
  = 1.10.2 =
151
  * Added a translation for Portuguese, courtesy of Carlos Jordão (thanks!)
152
  * Added the U ungreedy modifier to regular expressions to attempt to resolve occasional not-easily-reproduced blank page issues
@@ -252,6 +255,9 @@ directly attached to the post.
252
 
253
  == Upgrade Notice ==
254
 
 
 
 
255
  = 1.10.2 =
256
  * Added a translation for Portuguese, courtesy of Carlos Jordão (thanks!)
257
  * Added the U ungreedy modifier to regular expressions to attempt to resolve occasional not-easily-reproduced blank page issues
4
  Tags: gallery links, gallery link, gallery
5
  Requires at least: 3.3.1
6
  Tested up to: 4.2
7
+ Stable tag: 1.10.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
147
 
148
  == Changelog ==
149
 
150
+ = 1.10.3 =
151
+ * Added a "Do Not Change" default target option to improve performance by reducing the number of regexes to apply "_self" on every gallery item. If your theme opens all gallery items in a new window by default and you prefer to keep them in the same window, you will need to add open_all_in_same_window="true" to your gallery shortcode.
152
+
153
  = 1.10.2 =
154
  * Added a translation for Portuguese, courtesy of Carlos Jordão (thanks!)
155
  * Added the U ungreedy modifier to regular expressions to attempt to resolve occasional not-easily-reproduced blank page issues
255
 
256
  == Upgrade Notice ==
257
 
258
+ = 1.10.3 =
259
+ * Added a "Do Not Change" default target option to improve performance by reducing the number of regexes to apply "_self" on every gallery item. If your theme opens all gallery items in a new window by default and you prefer to keep them in the same window, you will need to add open_all_in_same_window="true" to your gallery shortcode.
260
+
261
  = 1.10.2 =
262
  * Added a translation for Portuguese, courtesy of Carlos Jordão (thanks!)
263
  * Added the U ungreedy modifier to regular expressions to attempt to resolve occasional not-easily-reproduced blank page issues
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: Specify custom links for WordPress gallery images (instead of attachment or file only).
6
- Version: 1.10.2
7
  Author: Four Lights Web Development
8
  Author URI: http://www.fourlightsweb.com
9
  License: GPL2
@@ -97,7 +97,8 @@ class WPGalleryCustomLinks {
97
  'input' => 'html',
98
  'html' => '
99
  <select name="attachments['.$post->ID.'][gallery_link_target]" id="attachments['.$post->ID.'][gallery_link_target]">
100
- <option value="">'.__( 'Same Window', self::$textdomain_id ).'</option>
 
101
  <option value="_blank"'.($target_value == '_blank' ? ' selected="selected"' : '').'>'.__( 'New Window', self::$textdomain_id ).'</option>
102
  </select>'
103
  );
@@ -235,20 +236,6 @@ class WPGalleryCustomLinks {
235
  if( $attachment_meta ) {
236
  $target = $attachment_meta;
237
  }
238
- if( trim( $target ) == '' ) {
239
- // If empty string ("Same Window") is selected, set target to _self
240
- $target = '_self';
241
- // ^^ I'm still a little iffy on the above:
242
- // Most people's galleries open things in the same window, except that one lady's theme,
243
- // but if I default empty string ("Same Window") to mean "same window" instead of "whatever it normally does" then
244
- // she'd have to override every gallery if she wanted to keep her theme's normal behavior.
245
- // Shouldn't it be the other way around? But if I leave it the way it is, the alternative
246
- // is she'd have to modify her theme to default to new window in order to open in the same
247
- // window at all, and most people don't have that skill level. But I also don't want
248
- // the text "Same Window" to be misleading if it really means "just do what you normally do."
249
- // Am I thinking too hard about this? I guess this is what happens when you don't distinguish
250
- // between "default" and "separate override option."
251
- }
252
  if( isset( $attr['open_all_in_new_window'] ) && strtolower( trim( $attr['open_all_in_new_window'] ) ) === 'true' ) {
253
  // Override setting if the gallery shortcode says to open everything in a new window
254
  // This should accommodate both "3000 images in new window" guy (to some extent) and allow _blank
3
  Plugin Name: WP Gallery Custom Links
4
  Plugin URI: http://www.fourlightsweb.com/wordpress-plugins/wp-gallery-custom-links/
5
  Description: Specify custom links for WordPress gallery images (instead of attachment or file only).
6
+ Version: 1.10.3
7
  Author: Four Lights Web Development
8
  Author URI: http://www.fourlightsweb.com
9
  License: GPL2
97
  'input' => 'html',
98
  'html' => '
99
  <select name="attachments['.$post->ID.'][gallery_link_target]" id="attachments['.$post->ID.'][gallery_link_target]">
100
+ <option value="">'.__( 'Do Not Change', self::$textdomain_id ).'</option>
101
+ <option value="_self"'.($target_value == '_self' ? ' selected="selected"' : '').'>'.__( 'Same Window', self::$textdomain_id ).'</option>
102
  <option value="_blank"'.($target_value == '_blank' ? ' selected="selected"' : '').'>'.__( 'New Window', self::$textdomain_id ).'</option>
103
  </select>'
104
  );
236
  if( $attachment_meta ) {
237
  $target = $attachment_meta;
238
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  if( isset( $attr['open_all_in_new_window'] ) && strtolower( trim( $attr['open_all_in_new_window'] ) ) === 'true' ) {
240
  // Override setting if the gallery shortcode says to open everything in a new window
241
  // This should accommodate both "3000 images in new window" guy (to some extent) and allow _blank