wp_sitemaps_enabled filter-hook . WP 5.5.0
Filters whether XML Sitemaps are enabled or not.
When XML Sitemaps are disabled via this filter, rewrite rules are still in place to ensure a 404 is returned.
Usage
add_filter( 'wp_sitemaps_enabled', 'filter_function_name_7959' ); function filter_function_name_7959( $is_enabled ){ // filter... return $is_enabled; }
- $is_enabled(true/false)
- Whether XML Sitemaps are enabled or not.
Default: true for public sites
Changelog
Since 5.5.0 | Introduced. |
Where the hook is called
wp_sitemaps_enabled
wp-includes/sitemaps/class-wp-sitemaps.php 104
return (bool) apply_filters( 'wp_sitemaps_enabled', $is_enabled );