WP_Sitemaps_Registry::get_provider( string $name ): WP_Sitemaps_Provider|null

In this article

Returns a single registered sitemap provider.

Parameters

$namestringrequired
Sitemap provider name.

Return

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

Source

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

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

Changelog

VersionDescription
5.5.0Introduced.

User Contributed Notes

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