A WordPress-centric search engine for devs and theme authors



wp_register_sitemap_provider ›

Since5.5.0
Deprecatedn/a
wp_register_sitemap_provider ( $name, $provider )
Parameters: (2)
  • (string) $name Unique name for the sitemap provider.
    Required: Yes
  • (WP_Sitemaps_Provider) $provider The `Sitemaps_Provider` instance implementing the sitemap.
    Required: Yes
Returns:
  • (bool) Whether the sitemap was added.
Defined at:
Codex:

Registers a new sitemap provider.



Source

function wp_register_sitemap_provider( $name, WP_Sitemaps_Provider $provider ) {
	$sitemaps = wp_sitemaps_get_server();
	return $sitemaps->registry->add_provider( $name, $provider );
}