wp_register_sitemap_provider( string $name, WP_Sitemaps_Provider $provider ): bool

Registers a new sitemap provider.


Parameters

$name string Required
Unique name for the sitemap provider.
$provider WP_Sitemaps_Provider Required
The Sitemaps_Provider instance implementing the sitemap.

Top ↑

Return

bool Whether the sitemap was added.


Top ↑

Source

File: wp-includes/sitemaps.php. View all references

function wp_register_sitemap_provider( $name, WP_Sitemaps_Provider $provider ) {
	$sitemaps = wp_sitemaps_get_server();

	return $sitemaps->registry->add_provider( $name, $provider );
}


Top ↑

Changelog

Changelog
Version Description
5.5.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.