WordPress at a glance
function is not described

WP_Sitemaps::sitemaps_enabled() public WP 5.5.0

Determines whether sitemaps are enabled or not.

{} It's a method of the class: WP_Sitemaps{}

Hooks from the method

true|false. Whether sitemaps are enabled.


$WP_Sitemaps = new WP_Sitemaps();


Since 5.5.0 Introduced.

Code of WP_Sitemaps::sitemaps_enabled() WP 5.7.2

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 );