wp_sitemaps_get_server example

return $wp_sitemaps;
}

/** * Gets an array of sitemap providers. * * @since 5.5.0 * * @return WP_Sitemaps_Provider[] Array of sitemap providers. */
function wp_get_sitemap_providers() {
    $sitemaps = wp_sitemaps_get_server();

    return $sitemaps->registry->get_providers();
}

/** * Registers a new sitemap provider. * * @since 5.5.0 * * @param string $name Unique name for the sitemap provider. * @param WP_Sitemaps_Provider $provider The `Sitemaps_Provider` instance implementing the sitemap. * @return bool Whether the sitemap was added. */
Home | Imprint | This part of the site doesn't use cookies.