跳到内容

Gallery Shortcode Style to Head

v2.4

Matt Martz · 2008年8月27日 上架

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

正在使用
100+
评分
5.0 / 5
累计下载
1.2 万
最近更新
2015年4月3日
1 条评价需要 WordPress 3.3+已测试到 4.1.42

截图

Plugin settings (under Admin > Settings > Media).
Plugin settings (under Admin > Settings > Media).

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/

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums