wp_register_sitemap_provider( string $name, WP_Sitemaps_Provider $provider )

Registers a new sitemap provider.


Parameters Parameters

$name

(string) (Required) Unique name for the sitemap provider.

$provider

(WP_Sitemaps_Provider) (Required) The Sitemaps_Provider instance implementing the sitemap.


Top ↑

Return Return

(bool) Whether the sitemap was added.


Top ↑

Source Source

File: wp-includes/sitemaps.php

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

Changelog
Version Description
5.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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