WP_Sitemaps_Stylesheet example

return;
        }

        if ( ! $this->sitemaps_enabled() ) {
            $wp_query->set_404();
            status_header( 404 );
            return;
        }

        // Render stylesheet if this is stylesheet route.         if ( $stylesheet_type ) {
            $stylesheet = new WP_Sitemaps_Stylesheet();

            $stylesheet->render_stylesheet( $stylesheet_type );
            exit;
        }

        // Render the index.         if ( 'index' === $sitemap ) {
            $sitemap_list = $this->index->get_sitemap_list();

            $this->renderer->render_index( $sitemap_list );
            exit;
        }
Home | Imprint | This part of the site doesn't use cookies.