diff --git a/wp-includes/sitemaps.php b/wp-includes/sitemaps.php index f556246be5..6bc4d71e69 100644 --- a/wp-includes/sitemaps.php +++ b/wp-includes/sitemaps.php @@ -22,8 +22,6 @@ function wp_sitemaps_get_server() { global $wp_sitemaps; - $is_enabled = (bool) get_option( 'blog_public' ); - // If there isn't a global instance, set and bootstrap the sitemaps system. if ( empty( $wp_sitemaps ) ) { $wp_sitemaps = new WP_Sitemaps(); @@ -51,13 +49,8 @@ function wp_sitemaps_get_server() { * * @return WP_Sitemaps_Provider[] Array of sitemap providers. */ -function wp_get_sitemaps() { +function wp_get_sitemaps_providers() { $sitemaps = wp_sitemaps_get_server(); - - if ( ! $sitemaps ) { - return array(); - } - return $sitemaps->registry->get_providers(); } @@ -72,11 +65,6 @@ function wp_get_sitemaps() { */ function wp_register_sitemap( $name, WP_Sitemaps_Provider $provider ) { $sitemaps = wp_sitemaps_get_server(); - - if ( ! $sitemaps ) { - return false; - } - return $sitemaps->registry->add_provider( $name, $provider ); } diff --git a/wp-includes/sitemaps/class-wp-sitemaps-registry.php b/wp-includes/sitemaps/class-wp-sitemaps-registry.php index 1235670a27..f4aec2f41a 100644 --- a/wp-includes/sitemaps/class-wp-sitemaps-registry.php +++ b/wp-includes/sitemaps/class-wp-sitemaps-registry.php @@ -49,7 +49,7 @@ class WP_Sitemaps_Registry { * @since 5.5.0 * * @param string $name Sitemap provider name. - * @return WP_Sitemaps_Provider|null Sitemaps provider if it exists, null otherwise. + * @return WP_Sitemaps_Provider|null Sitemap provider if it exists, null otherwise. */ public function get_provider( $name ) { if ( ! isset( $this->providers[ $name ] ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 5aaac7bae1..be3771035f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-beta2-48539'; +$wp_version = '5.5-beta2-48540'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.