WP_Sitemaps_Index::get_index_url
Builds the URL for the sitemap index.
Метод класса: WP_Sitemaps_Index{}
Хуков нет.
Возвращает
string. The sitemap index URL.
Использование
$WP_Sitemaps_Index = new WP_Sitemaps_Index(); $WP_Sitemaps_Index->get_index_url();
Заметки
Global. WP_Rewrite. $wp_rewrite WordPress rewrite component. |
Список изменений
| С версии 5.5.0 | Введена. |
Код WP_Sitemaps_Index::get_index_url() WP Sitemaps Index::get index url WP 7.1.2
public function get_index_url() {
global $wp_rewrite;
if ( ! $wp_rewrite->using_permalinks() ) {
return home_url( '/?sitemap=index' );
}
return home_url( '/wp-sitemap.xml' );
}