wp_sitemaps_stylesheet_url filter-hookWP 5.5.0

Filters the URL for the sitemap stylesheet.

If a falsey value is returned, no stylesheet will be used and the "raw" XML of the sitemap will be displayed.

Usage

add_filter( 'wp_sitemaps_stylesheet_url', 'wp_kama_sitemaps_stylesheet_url_filter' );

/**
 * Function for `wp_sitemaps_stylesheet_url` filter-hook.
 * 
 * @param string $sitemap_url Full URL for the sitemaps XSL file.
 *
 * @return string
 */
function wp_kama_sitemaps_stylesheet_url_filter( $sitemap_url ){

	// filter...
	return $sitemap_url;
}
$sitemap_url(string)
Full URL for the sitemaps XSL file.

Changelog

Since 5.5.0 Introduced.

Where the hook is called

WP_Sitemaps_Renderer::get_sitemap_stylesheet_url()
wp_sitemaps_stylesheet_url
wp-includes/sitemaps/class-wp-sitemaps-renderer.php 84
return apply_filters( 'wp_sitemaps_stylesheet_url', $sitemap_url );

Where the hook is used in WordPress

Usage not found.