WordPress at a glance
function is not described

WP_Sitemaps_Registry::get_provider() public WP 5.5.0

Returns a single registered sitemap provider.

It's a method of the class: WP_Sitemaps_Registry{}

No Hooks.

Return

WP_Sitemaps_Provider/null. Sitemap provider if it exists, null otherwise.

Usage

$WP_Sitemaps_Registry = new WP_Sitemaps_Registry();
$WP_Sitemaps_Registry->get_provider( $name );
$name(string) (required)
Sitemap provider name.

Changelog

Since 5.5.0 Introduced.

Code of WP_Sitemaps_Registry::get_provider() WP 5.5.1

<?php
public function get_provider( $name ) {
	if ( ! isset( $this->providers[ $name ] ) ) {
		return null;
	}

	return $this->providers[ $name ];
}