API / Minn\Front / SitemapRequest

SitemapRequest final class

Minn\Front\SitemapRequest · public/minn/src/Minn/Front/SitemapRequest.php · 71 lines

A sitemap request at template_redirect, as the reference's sitemaps server answers it: a sitemap address asked for another way (the query form, page 0) moves to its own; with the sitemaps off, a provider nobody registered, or a subtype or page that has nothing, the request is a 404 the theme renders; otherwise the stylesheet, the index or the provider's page is printed and the request ends. Since 7.1.3 this is where a sitemap page is judged: the main query no longer makes an empty page a 404 first, so a page a plugin fills past the page count still prints.

Public

staticcanonical(): void#

The canonical step: a sitemap asked for by another address is sent to its own.

staticserve(WP_Sitemaps $server): void#

What the sitemaps server does with the request (render_sitemaps).

Internals 2

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privatepage(WP_Sitemaps $server, string $sitemap, string $subtype): void#

One provider's page: printed, or a 404 when the subtype is not the provider's or the page has nothing.

privatenotFound(): void#

The main query made a 404, which the theme renders.