WordPress at a glance
функция не описана

WP_Sitemaps_Renderer::render_index() public WP 5.5.0

Renders a sitemap index.

It's a method of the class: WP_Sitemaps_Renderer{}

Хуков нет.

Возвращает

Null. Ничего.

Использование

$WP_Sitemaps_Renderer = new WP_Sitemaps_Renderer();
$WP_Sitemaps_Renderer->render_index( $sitemaps );
$sitemaps(array) (required)
Array of sitemap URLs.

Changelog

Since 5.5.0 Introduced.

Код WP_Sitemaps_Renderer::render_index() WP 5.5.1

<?php
public function render_index( $sitemaps ) {
	header( 'Content-type: application/xml; charset=UTF-8' );

	$this->check_for_simple_xml_availability();

	$index_xml = $this->get_sitemap_index_xml( $sitemaps );

	if ( ! empty( $index_xml ) ) {
		// All output is escaped within get_sitemap_index_xml().
		// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
		echo $index_xml;
	}
}