WP_Sitemaps_Users example



    /** * Registers and sets up the functionality for all supported sitemaps. * * @since 5.5.0 */
    public function register_sitemaps() {
        $providers = array(
            'posts'      => new WP_Sitemaps_Posts(),
            'taxonomies' => new WP_Sitemaps_Taxonomies(),
            'users'      => new WP_Sitemaps_Users(),
        );

        /* @var WP_Sitemaps_Provider $provider */
        foreach ( $providers as $name => $provider ) {
            $this->registry->add_provider( $name$provider );
        }
    }

    /** * Registers sitemap rewrite tags and routing rules. * * @since 5.5.0 */
Home | Imprint | This part of the site doesn't use cookies.