Registers a new sitemap provider.
Parameters
$name
stringrequired- Unique name for the sitemap provider.
$provider
WP_Sitemaps_Providerrequired- The
Sitemaps_Provider
instance implementing the sitemap.
Source
function wp_register_sitemap_provider( $name, WP_Sitemaps_Provider $provider ) {
$sitemaps = wp_sitemaps_get_server();
return $sitemaps->registry->add_provider( $name, $provider );
}
Changelog
Version | Description |
---|---|
5.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.