On this page
apply_filters( 'wp_sitemaps_enabled', bool $is_enabled )
Filters whether XML Sitemaps are enabled or not.
Description
When XML Sitemaps are disabled via this filter, rewrite rules are still in place to ensure a 404 is returned.
See also
Parameters
$is_enabledbool-
Whether XML Sitemaps are enabled or not. Defaults to true for public sites.
Source
File: wp-includes/sitemaps/class-wp-sitemaps.php. View all references
return (bool) apply_filters( 'wp_sitemaps_enabled', $is_enabled );
Related
Used By
| Used By | Description |
|---|---|
| WP_Sitemaps::sitemaps_enabled() wp-includes/sitemaps/class-wp-sitemaps.php | Determines whether sitemaps are enabled or not. |
Changelog
| Version | Description |
|---|---|
| 5.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_sitemaps_enabled