[wp-trac] [WordPress Trac] #51211: Implement a consistent function to obtain the sitemap location
WordPress Trac
noreply at wordpress.org
Wed Sep 2 01:52:56 UTC 2020
#51211: Implement a consistent function to obtain the sitemap location
-------------------------+-----------------------------
Reporter: GreatBlakes | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Sitemaps | Version: 5.5.1
Severity: trivial | Keywords:
Focuses: |
-------------------------+-----------------------------
Would it be possible to implement a function that returns the active XML
sitemap location? With so many major plugins choosing to disable the WP
core sitemap to continue using their own, it is difficult for others to
easily know which is actually being used– especially if those plugins have
the option of disabling their sitemap functionality (which means we can't
simply detect if the plugin is active to know).
Notable sitemap locations:
- **WordPress Core:** wp-sitemap.xml
- **Yoast SEO:** sitemap_index.xml
- **The SEO Framework:** sitemap.xml
Perhaps the function can be as simple as applying a filter inside that
plugins can hook into to modify the location? Something like the
following:
{{{
function get_sitemap_uri(){
return (string) apply_filters('sitemap_uri', home_url('/') . 'wp-
sitemap.xml');
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51211>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list