Changeset 1256708
- Timestamp:
- 09/30/2015 04:09:34 PM (11 years ago)
- Location:
- wp-gallery-custom-links/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (3 diffs)
-
wp-gallery-custom-links.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-gallery-custom-links/trunk/readme.txt
r1143471 r1256708 4 4 Tags: gallery links, gallery link, gallery 5 5 Requires at least: 3.3.1 6 Tested up to: 4. 27 Stable tag: 1.10. 36 Tested up to: 4.3.1 7 Stable tag: 1.10.4 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.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 150 155 = 1.10.3 = 151 156 * 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. … … 256 261 == Upgrade Notice == 257 262 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 258 268 = 1.10.3 = 259 269 * 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 3 3 Plugin Name: WP Gallery Custom Links 4 4 Plugin URI: http://www.fourlightsweb.com/wordpress-plugins/wp-gallery-custom-links/ 5 Text Domain: wp-gallery-custom-links 5 6 Description: Specify custom links for WordPress gallery images (instead of attachment or file only). 6 Version: 1.10. 37 Version: 1.10.4 7 8 Author: Four Lights Web Development 8 9 Author URI: http://www.fourlightsweb.com … … 26 27 27 28 add_action( 'init', array( 'WPGalleryCustomLinks', 'init' ) ); 29 add_action( 'plugins_loaded', array( 'WPGalleryCustomLinks', 'loadPluginTextDomain' ) ); 28 30 29 31 class WPGalleryCustomLinks { … … 45 47 private static $class_name = 'WPGalleryCustomLinks'; 46 48 47 public static function init() { 49 public static function init() { 48 50 // Add the filter for editing the custom url field 49 51 add_filter( 'attachment_fields_to_edit', array( self::$class_name, 'apply_filter_attachment_fields_to_edit' ), null, 2 ); … … 61 63 load_plugin_textdomain( self::$textdomain_id, false, basename( dirname( __FILE__ ) ) . '/languages' ); 62 64 } // 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 } 63 70 64 71 public static function do_action_wp_enqueue_scripts() { … … 73 80 74 81 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;'; 76 83 77 84 // Gallery Link URL field 78 85 $form_fields['gallery_link_url'] = array( 79 86 '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">' . 82 89 __( '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 ) . 83 90 ' <a href="#" onclick="jQuery(\'#wpgcl_gallery_link_url_help\').hide(); return false;">[X]</a>' . … … 90 97 $form_fields['gallery_link_target'] = array( 91 98 '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">' . 94 101 __( '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 ) . 95 102 ' <a href="#" onclick="jQuery(\'#wpgcl_gallery_link_target_help\').hide(); return false;">[X]</a>' . … … 107 114 $form_fields['gallery_link_preserve_click'] = array( 108 115 '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">' . 111 118 __( '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 ) . 112 119 ' <a href="#" onclick="jQuery(\'#wpgcl_gallery_link_preserve_click_help\').hide(); return false;">[X]</a>' . … … 122 129 $form_fields['gallery_link_additional_css_classes'] = array( 123 130 '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">' . 126 133 __( '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 ) . 127 134 ' <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.