WP_Sitemaps::register_sitemaps()
Registers and sets up the functionality for all supported sitemaps.
Method of the class: WP_Sitemaps{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WP_Sitemaps = new WP_Sitemaps(); $WP_Sitemaps->register_sitemaps();
Changelog
Since 5.5.0 | Introduced. |
WP_Sitemaps::register_sitemaps() WP Sitemaps::register sitemaps code WP 6.6.2
public function register_sitemaps() { $providers = array( 'posts' => new WP_Sitemaps_Posts(), 'taxonomies' => new WP_Sitemaps_Taxonomies(), 'users' => new WP_Sitemaps_Users(), ); /* @var WP_Sitemaps_Provider $provider */ foreach ( $providers as $name => $provider ) { $this->registry->add_provider( $name, $provider ); } }