Plugin Directory

Changeset 1143471


Ignore:
Timestamp:
04/23/2015 04:08:23 PM (11 years ago)
Author:
fourlightsweb
Message:

Added "Do Not Change" default option for target to improve performance

Location:
wp-gallery-custom-links/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-gallery-custom-links/trunk/readme.txt

    r1142569 r1143471  
    55Requires at least: 3.3.1
    66Tested up to: 4.2
    7 Stable tag: 1.10.2
     7Stable tag: 1.10.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    148148== Changelog ==
    149149
     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
    150153= 1.10.2 =
    151154* Added a translation for Portuguese, courtesy of Carlos Jordão (thanks!)
     
    253256== Upgrade Notice ==
    254257
     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
    255261= 1.10.2 =
    256262* Added a translation for Portuguese, courtesy of Carlos Jordão (thanks!)
  • wp-gallery-custom-links/trunk/wp-gallery-custom-links.php

    r1142569 r1143471  
    44Plugin URI: http://www.fourlightsweb.com/wordpress-plugins/wp-gallery-custom-links/
    55Description: Specify custom links for WordPress gallery images (instead of attachment or file only).
    6 Version: 1.10.2
     6Version: 1.10.3
    77Author: Four Lights Web Development
    88Author URI: http://www.fourlightsweb.com
     
    9898            'html'  => '
    9999                <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>
    101102                    <option value="_blank"'.($target_value == '_blank' ? ' selected="selected"' : '').'>'.__( 'New Window', self::$textdomain_id ).'</option>
    102103                </select>'
     
    235236            if( $attachment_meta ) {
    236237                $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."
    251238            }
    252239            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.