gallery_style
云策文档标注
概述
gallery_style 过滤器用于修改默认图库短码的 CSS 样式和 HTML 容器。它允许开发者自定义图库的外观和结构。
关键要点
- 过滤器名称:gallery_style
- 参数:$gallery_style(字符串),包含默认 CSS 样式和打开 HTML div 容器的内容
- 应用位置:在 gallery_shortcode() 函数中,通过 apply_filters 调用,输出为 $gallery_style . $gallery_div
- 相关函数:gallery_shortcode() 位于 wp-includes/media.php,用于构建图库短码输出
- 引入版本:WordPress 2.5.0
原文内容
Filters the default gallery shortcode CSS styles.
Parameters
$gallery_stylestring-
Default CSS styles and opening HTML div container for the gallery shortcode output.
Source
$output = apply_filters( 'gallery_style', $gallery_style . $gallery_div );
Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |