wp_sitemaps_stylesheet_content filter-hookWP 5.5.0

Filters the content of the sitemap stylesheet.

Usage

add_filter( 'wp_sitemaps_stylesheet_content', 'wp_kama_sitemaps_stylesheet_content_filter' );

/**
 * Function for `wp_sitemaps_stylesheet_content` filter-hook.
 * 
 * @param string $xsl_content Full content for the XML stylesheet.
 *
 * @return string
 */
function wp_kama_sitemaps_stylesheet_content_filter( $xsl_content ){

	// filter...
	return $xsl_content;
}
$xsl_content(string)
Full content for the XML stylesheet.

Changelog

Since 5.5.0 Introduced.

Where the hook is called

WP_Sitemaps_Stylesheet::get_sitemap_stylesheet()
wp_sitemaps_stylesheet_content
wp-includes/sitemaps/class-wp-sitemaps-stylesheet.php 150
return apply_filters( 'wp_sitemaps_stylesheet_content', $xsl_content );

Where the hook is used in WordPress

Usage not found.