‡ç”0VðÐ!wŠ—0VàwŠ—0V0VÑð‘°”0V ‡ç”0V€Ñ!ðj…—0VàxŠ—0V0VÙ@Ű”0V ‡ç”0VÒ! k…—0VÀyŠ—0V0VáPŰ”0V ‡ç”0V Ò!Pk…—0V zŠ—0V0Vé`Ű”0V ‡ç”0V0Óa€k…—0V€{Š—0V0Vñ@Ȱ”0V ‡ç”0VÀÓ!°k…—0V€|Š—0V0Vù0Û°”0V ‡ç”0VPÔ!àk…—0V }Š—0V0Vи´”0V ‡ç”0VàÔ! l…—0V€~Š—0VÐ=š—0V0V P¾´”0V ‡ç”0VpÕ!ð~Š—0VàŠ—0V0V»´”0V ‡ç”0VÖ!P€Š—0V0Š—0V?š—0V0V ½´”0V ‡ç”0VÖ €Š—0V`‚Š—0V0V!pÀ´”0V ‡ç”0V ×Pl…—0V ƒŠ—0V0V)pB´”0V ‡ç”0V°× ðƒŠ—0VÐ„Š—0V0V1 ?´”0V ‡ç”0V@Ø!…Š—0Và…Š—0V0V9°>´”0V ‡ç”0VÐØ €l…—0Và†Š—0V0VA@@´”0V ‡ç”0V`Ù!°l…—0VÀ‡Š—0V0VIô°”0V ‡ç”0VðÙ!ðl…—0V ˆŠ—0V0VQö°”0V ‡ç”0V€Ú!0m…—0V€‰Š—0V0VY€÷°”0V ‡ç”0VÛ!°‰Š—0VŠŠ—0V0Va`~´”0V ‡ç”0V Û`m…—0Vð‹Š—0V0Vip‹´”0V ‡ç”0V0Ü!@ŒŠ—0V0Š—0V0Vq`ˆ´”0V ‡ç”0VÀÜ  m…—0V0ŽŠ—0V0Vy‰´”0V ‡ç”0VPÝ!`ŽŠ—0VPŠ—0V0V@†´”0V ‡ç”0VàÝ àm…—0VŠ—0V0V‰Ð…´”0V ‡ç”0VpÞ n…—0Vp‘Š—0V0V‘ð‰´”0V ‡ç”0Vß`n…—0VP’Š—0V0V™ÀŠ´”0V ‡ç”0Vß n…—0V0“Š—0V0V¡°Œ´”0V ‡ç”0V ààn…—0Vp”Š—0V0V©ÐŒ´”0V ‡ç”0V°àt( get_query_var( 'paged' ) ); // Bail early if this isn't a sitemap or stylesheet route. if ( ! ( $sitemap || $stylesheet_type ) ) { return; } if ( ! $this->sitemaps_enabled() ) { $wp_query->set_404(); status_header( 404 ); return; } // Render stylesheet if this is stylesheet route. if ( $stylesheet_type ) { $stylesheet = new WP_Sitemaps_Stylesheet(); $stylesheet->render_stylesheet( $stylesheet_type ); exit; } // Render the index. if ( 'index' === $sitemap ) { $sitemap_list = $this->index->get_sitemap_list(); $this->renderer->render_index( $sitemap_list ); exit; } $provider = $this->registry->get_provider( $sitemap ); if ( ! $provider ) { return; } if ( empty( $paged ) ) { $paged = 1; } $url_list = $provider->get_url_list( $paged, $object_subtype ); // Force a 404 and bail early if no URLs are present. if ( empty( $url_list ) ) { $wp_query->set_404(); status_header( 404 ); return; } $this->renderer->render_sitemap( $url_list ); exit; } /** * Redirects a URL to the wp-sitemap.xml * * @since 5.5.0 * * @param bool $bypass Pass-through of the pre_handle_404 filter value. * @param WP_Query $query The WP_Query object. * @return bool Bypass value. */ public function redirect_sitemapxml( $bypass, $query ) { // If a plugin has already utilized the pre_handle_404 function, return without action to avoid conflicts. if ( $bypass ) { return $bypass; } // 'pagename' is for most permalink types, name is for when the %postname% is used as a top-level field. if ( 'sitemap-xml' === $query->get( 'pagename' ) || 'sitemap-xml' === $query->get( 'name' ) ) { wp_safe_redirect( $this->index->get_index_url() ); exit(); } return $bypass; } /** * Adds the sitemap index to robots.txt. * * @since 5.5.0 * * @param string $output robots.txt output. * @param bool $public Whether the site is public. * @return string The robots.txt output. */ public function add_robots( $output, $public ) { if ( $public ) { $output .= "\nSitemap: " . esc_url( $this->index->get_index_url() ) . "\n"; } return $output; } }