wp-includes/sitemaps/class-wp-sitemaps.php:88Determines whether sitemaps are enabled or not.
boolOne hook fires while WP_Sitemaps::sitemaps_enabled() runs, in this order:
Filters whether XML Sitemaps are enabled or not.
public function sitemaps_enabled() { $is_enabled = (bool) get_option( 'blog_public' ); /** * 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. */ return (bool) apply_filters( 'wp_sitemaps_enabled', $is_enabled ); }Introduced in 5.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/sitemaps/class-wp-sitemaps.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.