wp_sitemaps_stylesheet_content
云策文档标注
概述
wp_sitemaps_stylesheet_content 是一个 WordPress 过滤器,用于修改站点地图样式表的内容。它允许开发者自定义 XML 样式表的输出,适用于所有非索引站点地图。
关键要点
- 过滤器名称:wp_sitemaps_stylesheet_content
- 参数:$xsl_content(字符串),表示完整的 XML 样式表内容
- 用途:过滤站点地图样式表的内容,可用于自定义样式或添加额外信息
- 相关函数:WP_Sitemaps_Stylesheet::get_sitemap_stylesheet() 返回转义后的 XSL
- 引入版本:WordPress 5.5.0
原文内容
Filters the content of the sitemap stylesheet.
Parameters
$xsl_contentstring-
Full content for the XML stylesheet.
Source
return apply_filters( 'wp_sitemaps_stylesheet_content', $xsl_content );
Changelog
| Version | Description |
|---|---|
| 5.5.0 | Introduced. |