Filter hook 'wp_sitemaps_enabled'
in WP Core File wp-includes/sitemaps/class-wp-sitemaps.php at line 105
Description
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.
Occurrences
Filename |
Line Number |
wp-includes/sitemaps/class-wp-sitemaps.php |
105 |
Parameters
Type |
Name |
Description |
bool |
$is_enabled |
Whether XML Sitemaps are enabled or not. Defaults to true for public sites. |
PHP Doc
/**
* 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.
*
* @see WP_Sitemaps::register_rewrites()
*
* @since 5.5.0
*
* @param bool $is_enabled Whether XML Sitemaps are enabled or not.
* Defaults to true for public sites.
*/