WordPress at a glance
function is not described

WP_Sitemaps::init() public WP 5.5.0

Initiates all sitemap functionality.

If sitemaps are disabled, only the rewrite rules will be registered by this method, in order to properly send 404s.

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

No Hooks.

Return

Null. Nothing.

Usage

$WP_Sitemaps = new WP_Sitemaps();
$WP_Sitemaps->init();

Changelog

Since 5.5.0 Introduced.

Code of WP_Sitemaps::init() WP 5.5.1

<?php
public function init() {
	// These will all fire on the init hook.
	$this->register_rewrites();

	add_action( 'template_redirect', array( $this, 'render_sitemaps' ) );

	if ( ! $this->sitemaps_enabled() ) {
		return;
	}

	$this->register_sitemaps();

	// Add additional action callbacks.
	add_filter( 'pre_handle_404', array( $this, 'redirect_sitemapxml' ), 10, 2 );
	add_filter( 'robots_txt', array( $this, 'add_robots' ), 0, 2 );
}