BACK TO DIRECTORY

Gallery Shortcode Style to Head

by Matt Martz

5.0
(1 ratings)

Moves the gallery shortcode styles to the head so it doesn’t break XHTML
validation; allows disabling or modifying the default gallery styles.

By default when using the WordPress gallery, the styles are placed into the
post content which breaks XHTML validation. This plugin moves the style into
the head of the page using a look-ahead to determine if the [gallery]
shortcode is used in any posts.

This plugin also gives you the option to modify the default gallery style
CSS or disable the gallery styles entirely (so you can control it from your
template CSS files).

This plugin uses ideas recommended in a patch located at
https://trac.wordpress.org/attachment/ticket/6380/6380-style.diff

Special thanks to
* The original author: Matt Martz, http://sivel.net
* Serbo-Croatian (sr_RS) translation: Borisa Djuraskovic, http://www.webhostinghub.com
* Spanish (es_ES) translation: Ogi Djuraskovic, http://www.webhostinghub.com/

Screenshots

Plugin settings (under Admin > Settings > Media).

Plugin settings (under Admin > Settings > Media).

Plugin Details

Active Installs
100
Total Downloads
11,848
Version
2.4
Requires WP
3.3
Requires PHP
Tested Up To
4.1.42
Added
2008-08-27
Last Updated
2015-04-02 4:12pm GMT

Ratings

5
1
4
0
3
0
2
0
1
0