diff --git a/wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php b/wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php index 31515f806a..e8fcc6d5ab 100644 --- a/wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php +++ b/wp-includes/sitemaps/providers/class-wp-sitemaps-taxonomies.php @@ -99,8 +99,14 @@ class WP_Sitemaps_Taxonomies extends WP_Sitemaps_Provider { if ( ! empty( $taxonomy_terms->terms ) ) { foreach ( $taxonomy_terms->terms as $term ) { + $term_link = get_term_link( $term, $taxonomy ); + + if ( is_wp_error( $term_link ) ) { + continue; + } + $sitemap_entry = array( - 'loc' => get_term_link( $term ), + 'loc' => $term_link, ); /** diff --git a/wp-includes/version.php b/wp-includes/version.php index e0c1abcd67..e4dc78d2ec 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-49136'; +$wp_version = '5.6-alpha-49137'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.