Changeset 156582
- Timestamp:
- 09/20/2009 10:37:09 PM (16 years ago)
- Location:
- gallery-shortcode-style-to-head/trunk
- Files:
-
- 2 edited
-
gallery-shortcode-style-to-head.php (modified) (3 diffs)
-
readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gallery-shortcode-style-to-head/trunk/gallery-shortcode-style-to-head.php
r114475 r156582 2 2 /* 3 3 Plugin Name: Gallery Shortcode Style to Head 4 Plugin URI: http:// sivel.net/wordpress/gallery-shortcode-style-to-head/4 Plugin URI: http://www.scottbradford.us/software/gallery-shortcode-style-to-head/ 5 5 Description: Moves the gallery shortcode styles to the head so it doesn't break XHTML validation 6 Author: Matt Martz7 Author URI: http:// sivel.net/8 Version: 1. 16 Author: Scott Bradford 7 Author URI: http://www.scottbradford.us/ 8 Version: 1.2 9 9 10 Copyright (c) 2008 Matt Martz (http://sivel.net) 11 Gallery Shortcode Style to Head is released under the GNU General Public License (GPL) 10 Copyright (c) 2008 Matt Martz (http://sivel.net) (original author) 11 Copyright (c) 2009 Scott Bradford (http://www.scottbradford.us) (current maintainer) 12 13 Gallery Shortcode Style to Head is released under the GNU General Public License (GPL) 12 14 http://www.gnu.org/licenses/gpl-2.0.txt 13 15 */ … … 65 67 66 68 foreach ( $attachments as $id => $attachment ) { 67 $link = wp_get_attachment_link ( $id, $size, true);69 $link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false); 68 70 $output .= "<{$itemtag} class='gallery-item' style='width:{$itemwidth}%'>"; 69 71 $output .= " … … 74 76 $output .= " 75 77 <{$captiontag} class='gallery-caption'> 76 {$attachment->post_excerpt}78 " . wptexturize($attachment->post_excerpt) . " 77 79 </{$captiontag}>"; 78 80 } -
gallery-shortcode-style-to-head/trunk/readme.txt
r154917 r156582 1 1 === Gallery Shortcode Style to Head === 2 2 Contributors: achmafooma, sivel 3 Tags: gallery, shortcode, style, css, xhtml, head 3 Tags: gallery, shortcode, style, css, xhtml, head, validation 4 4 Requires at least: 2.6 5 5 Tested up to: 2.9 6 Stable tag: 1. 16 Stable tag: 1.2 7 7 8 8 Moves the gallery shortcode styles to the head so it doesn't break XHTML … … 15 15 16 16 By default when using the gallery shortcode the styles are placed into the 17 post content which breaks XHTML validation. This plugin places the style into17 post content which breaks XHTML validation. This plugin places the style into 18 18 the head of the page using a look ahead to determine if the [gallery] 19 19 shortcode is used in any posts. … … 22 22 http://trac.wordpress.org/attachment/ticket/6380/6380-style.diff 23 23 24 The ticket ticket associated with the above diff is set to milestone 2.9. So it may take a while for the patch to be added to the WordPress core. 24 There is a ticket associated with this validation issue currently set for WordPress 2.9: 25 http://core.trac.wordpress.org/ticket/10734 26 27 Special thanks to the original author of this plugin, Matt Martz, http://sivel.net. 25 28 26 29 == Installation == … … 33 36 == Usage == 34 37 35 1. To override the default style use `add_filter('gallery_style', 'my_function');` somewhere in your theme, probably functions.php, where my_function returns the new style. The new style should begin with `<style type="text/css">` and end with `</style>`38 1. To override the default style use `add_filter('gallery_style', 'my_function');` somewhere in your theme, probably functions.php, where my_function returns the new style. The new style should begin with `<style type="text/css">` and end with `</style>` 36 39 37 40 == Upgrade == … … 42 45 == Usage == 43 46 44 1. Just activate and enjoy. Nothing else is required.47 1. Just activate and enjoy. Nothing else is required. 45 48 46 49 == Changelog == 50 51 = 1.2 (2009-09-20): = 52 * Corrected function of 'Link thumbnails to...' setting on galleries when this plugin is enabled. 47 53 48 54 = 1.1 (2008-09-22): =
Note: See TracChangeset
for help on using the changeset viewer.