- Timestamp:
- 07/21/2020 04:12:49 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/sitemaps/class-wp-sitemaps-registry.php
r48540 r48543 26 26 27 27 /** 28 * Adds a sitemap with route to the registry.28 * Adds a new sitemap provider. 29 29 * 30 30 * @since 5.5.0 … … 32 32 * @param string $name Name of the sitemap provider. 33 33 * @param WP_Sitemaps_Provider $provider Instance of a WP_Sitemaps_Provider. 34 * @return bool True if the provider was added, false if it is already registered.34 * @return bool Whether the provider was added successfully. 35 35 */ 36 36 public function add_provider( $name, WP_Sitemaps_Provider $provider ) { 37 37 if ( isset( $this->providers[ $name ] ) ) { 38 return false; 39 } 40 41 /** 42 * Filters the sitemap provider before it is added. 43 * 44 * @since 5.5.0 45 * 46 * @param WP_Sitemaps_Provider $provider Instance of a WP_Sitemaps_Provider. 47 * @param string $name Name of the sitemap provider. 48 */ 49 $provider = apply_filters( 'wp_sitemaps_add_provider', $provider, $name ); 50 if ( ! $provider instanceof WP_Sitemaps_Provider ) { 38 51 return false; 39 52 }
Note: See TracChangeset
for help on using the changeset viewer.