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.
Contents
Parameters
- $name
(string)(Required)Sitemap provider name.
Return
(WP_Sitemaps_Provider|null) Sitemap provider if it exists, null otherwise.
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 ]; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.5.0 | Introduced. |