wp_sitemaps_stylesheet_css
云策文档标注
概述
wp_sitemaps_stylesheet_css 是一个 WordPress 过滤器,用于自定义站点地图样式表的 CSS 内容。它允许开发者修改默认 XSL 文件中的 CSS 样式。
关键要点
- 这是一个过滤器 Hook,用于修改站点地图样式表的 CSS 字符串。
- 参数 $css 是一个字符串,表示要应用到默认 XSL 文件的 CSS。
- 在 WP_Sitemaps_Stylesheet::get_stylesheet_css() 方法中使用,位于 wp-includes/sitemaps/class-wp-sitemaps-stylesheet.php 文件中。
- 从 WordPress 5.5.0 版本开始引入。
原文内容
Filters the CSS only for the sitemap stylesheet.
Parameters
$cssstring-
CSS to be applied to default XSL file.
Source
return apply_filters( 'wp_sitemaps_stylesheet_css', $css );
Changelog
| Version | Description |
|---|---|
| 5.5.0 | Introduced. |