WordPress at Your Fingertips
filter is not described

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_2556' );
function filter_function_name_2556( $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::sitemaps_enabled()
wp_sitemaps_enabled
wp-includes/sitemaps/class-wp-sitemaps.php 104
return (bool) apply_filters( 'wp_sitemaps_enabled', $is_enabled );

Where in WP core the hook is used WordPress

Usage not found.