apply_filters ( 'jetpack_sitemap_location' )

Additional path for sitemap URIs. Default value is empty.<p>This string is any additional path fragment you want included between the home URL and the sitemap filenames. Exactly how this fragment is interpreted depends on your permalink settings. For example:</p> <p>Pretty permalinks:</p> <pre><code>home_url() . jetpack_sitemap_location . '/sitemap.xml'</code></pre> <p>Plain ("ugly") permalinks:</p> <pre><code>home_url() . jetpack_sitemap_location . '/?jetpack-sitemap=sitemap.xml'</code></pre> <p>PATHINFO permalinks:</p> <pre><code>home_url() . '/index.php' . jetpack_sitemap_location . '/sitemap.xml'</code></pre> <p>where 'sitemap.xml' is the name of a specific sitemap file. The value of this filter must be a valid path fragment per RFC 3986; in particular it must either be empty or begin with a '/'. Also take care that any restrictions on sitemap location imposed by the sitemap protocol are satisfied.</p> <p>The result of this filter is stored in an option, 'jetpack_sitemap_location'; that option is what gets read when the sitemap location is needed. This way we don't have to wait for init to finish before building sitemaps.</p>

Source file: modules/sitemaps/sitemaps.php

View in GitHub

Changelog

Since: Jetpack 4.8.0


Notes

Have a note to contribute?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s