Plugin Directory

Changeset 156582


Ignore:
Timestamp:
09/20/2009 10:37:09 PM (16 years ago)
Author:
achmafooma
Message:

Version 1.2 with 'Link thumbnails to...' fix

Location:
gallery-shortcode-style-to-head/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gallery-shortcode-style-to-head/trunk/gallery-shortcode-style-to-head.php

    r114475 r156582  
    22/*
    33Plugin Name: Gallery Shortcode Style to Head
    4 Plugin URI: http://sivel.net/wordpress/gallery-shortcode-style-to-head/
     4Plugin URI: http://www.scottbradford.us/software/gallery-shortcode-style-to-head/
    55Description: Moves the gallery shortcode styles to the head so it doesn't break XHTML validation
    6 Author: Matt Martz
    7 Author URI: http://sivel.net/
    8 Version: 1.1
     6Author: Scott Bradford
     7Author URI: http://www.scottbradford.us/
     8Version: 1.2
    99
    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)
    1214    http://www.gnu.org/licenses/gpl-2.0.txt
    1315*/
     
    6567
    6668    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);
    6870        $output .= "<{$itemtag} class='gallery-item' style='width:{$itemwidth}%'>";
    6971        $output .= "
     
    7476            $output .= "
    7577                <{$captiontag} class='gallery-caption'>
    76                 {$attachment->post_excerpt}
     78                " . wptexturize($attachment->post_excerpt) . "
    7779                </{$captiontag}>";
    7880        }
  • gallery-shortcode-style-to-head/trunk/readme.txt

    r154917 r156582  
    11=== Gallery Shortcode Style to Head ===
    22Contributors: achmafooma, sivel
    3 Tags: gallery, shortcode, style, css, xhtml, head
     3Tags: gallery, shortcode, style, css, xhtml, head, validation
    44Requires at least: 2.6
    55Tested up to: 2.9
    6 Stable tag: 1.1
     6Stable tag: 1.2
    77
    88Moves the gallery shortcode styles to the head so it doesn't break XHTML
     
    1515
    1616By default when using the gallery shortcode the styles are placed into the
    17 post content which breaks XHTML validation.  This plugin places the style into
     17post content which breaks XHTML validation. This plugin places the style into
    1818the head of the page using a look ahead to determine if the [gallery]
    1919shortcode is used in any posts.
     
    2222http://trac.wordpress.org/attachment/ticket/6380/6380-style.diff
    2323
    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.
     24There is a ticket associated with this validation issue currently set for WordPress 2.9:
     25http://core.trac.wordpress.org/ticket/10734
     26
     27Special thanks to the original author of this plugin, Matt Martz, http://sivel.net.
    2528
    2629== Installation ==
     
    3336== Usage ==
    3437
    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>`
     381. 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>`
    3639
    3740== Upgrade ==
     
    4245== Usage ==
    4346
    44 1. Just activate and enjoy.  Nothing else is required.
     471. Just activate and enjoy. Nothing else is required.
    4548
    4649== Changelog ==
     50
     51= 1.2 (2009-09-20): =
     52* Corrected function of 'Link thumbnails to...' setting on galleries when this plugin is enabled.
    4753
    4854= 1.1 (2008-09-22): =
Note: See TracChangeset for help on using the changeset viewer.