Plugin Directory

Changeset 1256708


Ignore:
Timestamp:
09/30/2015 04:09:34 PM (11 years ago)
Author:
fourlightsweb
Message:
  • Updated some text domain settings to be in accordance with the translate.wordpress.org translation system.
  • Polished up some of the help message styles to make them easier to read
  • Tested with WordPress 4.3
Location:
wp-gallery-custom-links/trunk
Files:
2 edited

Legend:

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

    r1143471 r1256708  
    44Tags: gallery links, gallery link, gallery
    55Requires at least: 3.3.1
    6 Tested up to: 4.2
    7 Stable tag: 1.10.3
     6Tested up to: 4.3.1
     7Stable tag: 1.10.4
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    148148== Changelog ==
    149149
     150= 1.10.4 =
     151* Updated some text domain settings to be in accordance with the translate.wordpress.org translation system.
     152* Polished up some of the help message styles to make them easier to read
     153* Tested with WordPress 4.3
     154
    150155= 1.10.3 =
    151156* 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.
     
    256261== Upgrade Notice ==
    257262
     263= 1.10.4 =
     264* Updated some text domain settings to be in accordance with the translate.wordpress.org translation system.
     265* Polished up some of the help message styles to make them easier to read
     266* Tested with WordPress 4.3
     267
    258268= 1.10.3 =
    259269* 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.
  • wp-gallery-custom-links/trunk/wp-gallery-custom-links.php

    r1143471 r1256708  
    33Plugin Name: WP Gallery Custom Links
    44Plugin URI: http://www.fourlightsweb.com/wordpress-plugins/wp-gallery-custom-links/
     5Text Domain: wp-gallery-custom-links
    56Description: Specify custom links for WordPress gallery images (instead of attachment or file only).
    6 Version: 1.10.3
     7Version: 1.10.4
    78Author: Four Lights Web Development
    89Author URI: http://www.fourlightsweb.com
     
    2627
    2728add_action( 'init', array( 'WPGalleryCustomLinks', 'init' ) );
     29add_action( 'plugins_loaded', array( 'WPGalleryCustomLinks', 'loadPluginTextDomain' ) );
    2830
    2931class WPGalleryCustomLinks {
     
    4547    private static $class_name = 'WPGalleryCustomLinks';
    4648   
    47     public static function init() { 
     49    public static function init() {
    4850        // Add the filter for editing the custom url field
    4951        add_filter( 'attachment_fields_to_edit', array( self::$class_name, 'apply_filter_attachment_fields_to_edit' ), null, 2 );
     
    6163        load_plugin_textdomain( self::$textdomain_id, false, basename( dirname( __FILE__ ) ) . '/languages' );
    6264    } // End function init()
     65
     66    public static function loadPluginTextDomain() {
     67        // The codex says this is needed to load plugin language files
     68        load_plugin_textdomain( self::$textdomain_id, false, basename( dirname( __FILE__ ) ) . '/languages' );
     69    }
    6370   
    6471    public static function do_action_wp_enqueue_scripts() {
     
    7380   
    7481    public static function apply_filter_attachment_fields_to_edit( $form_fields, $post ) {
    75         $help_css = 'display:none;position:absolute;background-color:#ffffe0;text-align:left;border:1px solid #dfdfdf;padding:10px;width:75%;font-weight:normal;border-radius:3px;';
     82        $help_css = 'z-index:999;display:none;position:absolute;margin-top:-100px;background-color:#ffffe0;text-align:left;border:1px solid #dfdfdf;padding:10px;width:75%;font-weight:normal;border-radius:3px;';
    7683   
    7784        // Gallery Link URL field
    7885        $form_fields['gallery_link_url'] = array(
    7986            'label' => __( 'Gallery Link URL', self::$textdomain_id ) .
    80                 ' <a href="#" onclick="jQuery(\'#wpgcl_gallery_link_url_help\').show(); return false;" onblur="jQuery(\'#wpgcl_gallery_link_url_help\').hide();">[?]</a>' .
    81                 '<div id="wpgcl_gallery_link_url_help" style="'.$help_css.'">' .
     87                ' <a href="#" onclick="jQuery(\'.wpgcl_gallery_link_help\').hide();jQuery(\'#wpgcl_gallery_link_url_help\').show(); return false;" onblur="jQuery(\'#wpgcl_gallery_link_url_help\').hide();">[?]</a>' .
     88                '<div id="wpgcl_gallery_link_url_help" style="'.$help_css.'" class="wpgcl_gallery_link_help">' .
    8289                __( 'Will replace "Image File" or "Attachment Page" link for this image in galleries. Use [none] to remove the link from this image in galleries.', self::$textdomain_id ) .
    8390                ' <a href="#" onclick="jQuery(\'#wpgcl_gallery_link_url_help\').hide(); return false;">[X]</a>' .
     
    9097        $form_fields['gallery_link_target'] = array(
    9198            'label' => __( 'Gallery Link Target', self::$textdomain_id ) .
    92                 ' <a href="#" onclick="jQuery(\'#wpgcl_gallery_link_target_help\').show(); return false;" onblur="jQuery(\'#wpgcl_gallery_link_target_help\').hide();">[?]</a>' .
    93                 '<div id="wpgcl_gallery_link_target_help" style="'.$help_css.'">' .
     99                ' <a href="#" onclick="jQuery(\'.wpgcl_gallery_link_help\').hide();jQuery(\'#wpgcl_gallery_link_target_help\').show(); return false;" onblur="jQuery(\'#wpgcl_gallery_link_target_help\').hide();">[?]</a>' .
     100                '<div id="wpgcl_gallery_link_target_help" style="'.$help_css.'" class="wpgcl_gallery_link_help">' .
    94101                __( 'This setting will be applied to this image in galleries regardless of whether or not a Gallery Link URL has been specified.', self::$textdomain_id ) .
    95102                ' <a href="#" onclick="jQuery(\'#wpgcl_gallery_link_target_help\').hide(); return false;">[X]</a>' .
     
    107114        $form_fields['gallery_link_preserve_click'] = array(
    108115            'label' => __( 'Gallery Link OnClick Effect', self::$textdomain_id ) .
    109                 ' <a href="#" onclick="jQuery(\'#wpgcl_gallery_link_preserve_click_help\').show(); return false;" onblur="jQuery(\'#wpgcl_gallery_link_preserve_click_help\').hide();">[?]</a>' .
    110                 '<div id="wpgcl_gallery_link_preserve_click_help" style="'.$help_css.'">' .
     116                ' <a href="#" onclick="jQuery(\'.wpgcl_gallery_link_help\').hide();jQuery(\'#wpgcl_gallery_link_preserve_click_help\').show(); return false;" onblur="jQuery(\'#wpgcl_gallery_link_preserve_click_help\').hide();">[?]</a>' .
     117                '<div id="wpgcl_gallery_link_preserve_click_help" style="'.$help_css.'" class="wpgcl_gallery_link_help">' .
    111118                __( 'Lightbox and other OnClick events are removed by default from this image in galleries. This setting will only be applied to this image in galleries if this image has a Gallery Link URL specified.', self::$textdomain_id ) .
    112119                ' <a href="#" onclick="jQuery(\'#wpgcl_gallery_link_preserve_click_help\').hide(); return false;">[X]</a>' .
     
    122129        $form_fields['gallery_link_additional_css_classes'] = array(
    123130            'label' => __( 'Gallery Link Additional CSS Classes', self::$textdomain_id ) .
    124                 ' <a href="#" onclick="jQuery(\'#wpgcl_gallery_link_additional_css_classes_help\').show(); return false;" onblur="jQuery(\'#wpgcl_gallery_link_additional_css_classes_help\').hide();">[?]</a>' .
    125                 '<div id="wpgcl_gallery_link_additional_css_classes_help" style="'.$help_css.'">' .
     131                ' <a href="#" onclick="jQuery(\'.wpgcl_gallery_link_help\').hide();jQuery(\'#wpgcl_gallery_link_additional_css_classes_help\').show(); return false;" onblur="jQuery(\'#wpgcl_gallery_link_additional_css_classes_help\').hide();">[?]</a>' .
     132                '<div id="wpgcl_gallery_link_additional_css_classes_help" style="'.$help_css.'" class="wpgcl_gallery_link_help">' .
    126133                __( 'Additional CSS classes specified here will be applied to the <strong><em>link</em></strong> around this image in galleries regardless of whether or not a Gallery Link URL has been specified.', self::$textdomain_id ) .
    127134                ' <a href="#" onclick="jQuery(\'#wpgcl_gallery_link_additional_css_classes_help\').hide(); return false;">[X]</a>' .
Note: See TracChangeset for help on using the changeset viewer.