You appear to be a bot. Output may be restricted
Description
Absolute URL of the current blog's sitemap.
Usage
$string = jetpack_sitemap_uri( $filename );
Parameters
- $filename
- ( string ) optional default: sitemap.xml – Sitemap file name. Defaults to 'sitemap.xml', the initial sitemaps page.
Returns
string Sitemap URL.
Source
File name: jetpack/modules/sitemaps/sitemaps.php
Lines:
1 to 24 of 24
function jetpack_sitemap_uri( $filename = 'sitemap.xml' ) { global $wp_rewrite; $location = Jetpack_Options::get_option_and_ensure_autoload( 'jetpack_sitemap_location', '' ); if ( $wp_rewrite->using_index_permalinks() ) { $sitemap_url = home_url( '/index.php' . $location . '/' . $filename ); } elseif ( $wp_rewrite->using_permalinks() ) { $sitemap_url = home_url( $location . '/' . $filename ); } else { $sitemap_url = home_url( $location . '/?jetpack-sitemap=' . $filename ); } /** * Filter sitemap URL relative to home URL. * * @module sitemaps * * @since 3.9.0 * * @param string $sitemap_url Sitemap URL. */ return apply_filters( 'jetpack_sitemap_location', $sitemap_url ); }