Changeset 1143471
- Timestamp:
- 04/23/2015 04:08:23 PM (11 years ago)
- Location:
- wp-gallery-custom-links/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (3 diffs)
-
wp-gallery-custom-links.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-gallery-custom-links/trunk/readme.txt
r1142569 r1143471 5 5 Requires at least: 3.3.1 6 6 Tested up to: 4.2 7 Stable tag: 1.10. 27 Stable tag: 1.10.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 148 148 == Changelog == 149 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 150 153 = 1.10.2 = 151 154 * Added a translation for Portuguese, courtesy of Carlos Jordão (thanks!) … … 253 256 == Upgrade Notice == 254 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 255 261 = 1.10.2 = 256 262 * Added a translation for Portuguese, courtesy of Carlos Jordão (thanks!) -
wp-gallery-custom-links/trunk/wp-gallery-custom-links.php
r1142569 r1143471 4 4 Plugin URI: http://www.fourlightsweb.com/wordpress-plugins/wp-gallery-custom-links/ 5 5 Description: Specify custom links for WordPress gallery images (instead of attachment or file only). 6 Version: 1.10. 26 Version: 1.10.3 7 7 Author: Four Lights Web Development 8 8 Author URI: http://www.fourlightsweb.com … … 98 98 'html' => ' 99 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> 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> 101 102 <option value="_blank"'.($target_value == '_blank' ? ' selected="selected"' : '').'>'.__( 'New Window', self::$textdomain_id ).'</option> 102 103 </select>' … … 235 236 if( $attachment_meta ) { 236 237 $target = $attachment_meta; 237 }238 if( trim( $target ) == '' ) {239 // If empty string ("Same Window") is selected, set target to _self240 $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" then244 // 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 alternative246 // is she'd have to modify her theme to default to new window in order to open in the same247 // window at all, and most people don't have that skill level. But I also don't want248 // 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 distinguish250 // between "default" and "separate override option."251 238 } 252 239 if( isset( $attr['open_all_in_new_window'] ) && strtolower( trim( $attr['open_all_in_new_window'] ) ) === 'true' ) {
Note: See TracChangeset
for help on using the changeset viewer.