Renders a sitemap index.
Parameters
$sitemaps
arrayrequired- Array of sitemap URLs.
Source
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().
echo $index_xml;
}
}
Changelog
Version | Description |
---|---|
5.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.