wp_sitemaps_stylesheet_index_content
Filter HookDescription
Filters the content of the sitemap index stylesheet.Hook Information
File Location |
wp-includes/sitemaps/class-wp-sitemaps-stylesheet.php
View on GitHub
|
Hook Type | Filter |
Line Number | 249 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$xsl_content
|
Full content for the XML stylesheet. |
Usage Examples
Basic Usage
<?php
// Hook into wp_sitemaps_stylesheet_index_content
add_filter('wp_sitemaps_stylesheet_index_content', 'my_custom_filter', 10, 1);
function my_custom_filter($xsl_content) {
// Your custom filtering logic here
return $xsl_content;
}
Source Code Context
wp-includes/sitemaps/class-wp-sitemaps-stylesheet.php:249
- How this hook is used in WordPress core
<?php
244 *
245 * @since 5.5.0
246 *
247 * @param string $xsl_content Full content for the XML stylesheet.
248 */
249 return apply_filters( 'wp_sitemaps_stylesheet_index_content', $xsl_content );
250 }
251
252 /**
253 * Gets the CSS to be included in sitemap XSL stylesheets.
254 *
PHP Documentation
<?php
/**
* Filters the content of the sitemap index stylesheet.
*
* @since 5.5.0
*
* @param string $xsl_content Full content for the XML stylesheet.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/sitemaps/class-wp-sitemaps-stylesheet.php
Related Hooks
Related hooks will be displayed here in future updates.