wp_sitemaps_stylesheet_index_url
Filters the URL for the sitemap index stylesheet.
If a falsey value is returned, no stylesheet will be used and the "raw" XML of the sitemap index will be displayed.
Использование
add_filter( 'wp_sitemaps_stylesheet_index_url', 'wp_kama_sitemaps_stylesheet_index_url_filter' );
/**
* Function for `wp_sitemaps_stylesheet_index_url` filter-hook.
*
* @param string $sitemap_url Full URL for the sitemaps index XSL file.
*
* @return string
*/
function wp_kama_sitemaps_stylesheet_index_url_filter( $sitemap_url ){
// filter...
return $sitemap_url;
}
- $sitemap_url(строка)
- Full URL for the sitemaps index XSL file.
Список изменений
| С версии 5.5.0 | Введена. |
Где вызывается хук
wp_sitemaps_stylesheet_index_url
wp-includes/sitemaps/class-wp-sitemaps-renderer.php 115
return apply_filters( 'wp_sitemaps_stylesheet_index_url', $sitemap_url );