FrontLifecycle final class
Minn\Theme\FrontLifecycle · public/minn/src/Minn/Theme/FrontLifecycle.php · 110 lines
WordPress's front-end request steps around the main query, as WP::main runs them (front lifecycle trace): parse the request (do_parse_request may take it over; query_vars names the public variables, a plugin's own read from the query string; request filters the result; parse_request follows), the main query, the 404 decision (pre_handle_404 first), the globals, and the headers (wp_headers, the status, send_headers). The engine has already resolved the URL; these steps tell plugins about it in the reference's order and let them change what the query asks.
Public
| static | parseRequest(Minn\Objects\Environment $wp, array $vars, array $given, ?Closure $parse = NULL): bool# | Parses the request: false when a plugin's do_parse_request took the parse over (the main query then does not run). The query string is the main query's to build, after.
| |||||||||
| static | handle404(Minn\Objects\Query $query, bool $notFound): void# | The 404 decision, the one place it is made: a plugin's pre_handle_404 may make it; otherwise a request for something the site does not have is a 404, as is an empty page past the first of any listing and an empty date archive that names nothing else (an existing term, author or type with no posts, a date inside one of those or inside a search, an empty search, the front: a 200); the status and no-cache headers follow. A feed is never a 404: one of nothing is an empty feed. | |||||||||
| static | sendHeaders(Minn\Objects\Environment $wp): void# | The headers the reference sends for the request: no caching for a signed-in reader or a 404, the content type, a pingback address for a single post that takes pings; then wp_headers, the status an error variable names, and send_headers. |
Nothing matches.