WP_Sitemaps_Renderer::get_sitemap_index_stylesheet_url()
Gets the URL for the sitemap index stylesheet.
Метод класса: WP_Sitemaps_Renderer{}
Хуки из метода
Возвращает
Строку
. The sitemap index stylesheet URL.
Использование
$WP_Sitemaps_Renderer = new WP_Sitemaps_Renderer(); $WP_Sitemaps_Renderer->get_sitemap_index_stylesheet_url();
Заметки
- Global. WP_Rewrite. $wp_rewrite WordPress rewrite component.
Список изменений
С версии 5.5.0 | Введена. |
Код WP_Sitemaps_Renderer::get_sitemap_index_stylesheet_url() WP Sitemaps Renderer::get sitemap index stylesheet url WP 6.5.2
public function get_sitemap_index_stylesheet_url() { global $wp_rewrite; $sitemap_url = home_url( '/wp-sitemap-index.xsl' ); if ( ! $wp_rewrite->using_permalinks() ) { $sitemap_url = home_url( '/?sitemap-stylesheet=index' ); } /** * 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. * * @since 5.5.0 * * @param string $sitemap_url Full URL for the sitemaps index XSL file. */ return apply_filters( 'wp_sitemaps_stylesheet_index_url', $sitemap_url ); }