WP_Sitemaps_Registry::get_provider() WordPress Method

The WP_Sitemaps_Registry::get_provider() method is used to get the sitemap provider for a given sitemap type.

WP_Sitemaps_Registry::get_provider( string $name ) #

Returns a single registered sitemap provider.


Parameters

$name

(string)(Required)Sitemap provider name.


Top ↑

Return

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


Top ↑

Source

File: wp-includes/sitemaps/class-wp-sitemaps-registry.php

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

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

Top ↑

Changelog

Changelog
VersionDescription
5.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.