PostQueryWhere final class
Minn\Runtime\PostQueryWhere · public/minn/src/Minn/Runtime/PostQueryWhere.php · 264 lines
The WHERE fragments WP_Query writes from its variables, in the reference's order and spacing (probe wp-query-sql): menu order, the legacy m date and the date variables, a slug or a page path, ids, parents, a page id (which replaces everything before it), authors, comment counts, mime types, passwords, and comment and ping status. Each appends to the parts it is handed and settles the variables it reads, as the reference leaves them.
Constants and properties
| private | LEGACY_DATE = array ( 4 => 'MONTH', 6 => 'DAYOFMONTH', 8 => 'HOUR', 10 => 'MINUTE', 12 => 'SECOND', ) | |
| private | readonly WP_Query $query | Promoted from the constructor. |
| private | readonly Minn\Runtime\PostQueryParts $parts | Promoted from the constructor. |
| private | readonly string $table | Promoted from the constructor. |
Public
| new | __construct(WP_Query $query, Minn\Runtime\PostQueryParts $parts, string $table)# | ||||
| method | dates(array $q): void# | Menu order, the m date, the date variables and the date_query. @param array<string, mixed> $q
| |||
| method | names(array $q): void# | The post a slug, a page path, an attachment slug, a name list, an id or an id list names, and the parent; a post type's query var stands for the name (the page path, for a hierarchical type).
| |||
| method | authors(array $q): void# | Authors (an author list's negatives become author__not_in, which wins over author__in), an author slug, a comment count, and mime types. The slug and mime clauses wait to follow the search.
| |||
| method | access(array $q): void# | A password, or whether there is one, and comment and ping status. @param array<string, mixed> $q
|
Internals 6
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | nameList(array $q, array $names): void# | A name list, sanitized in place; the clause lists each name once, sorted. @param array<string, mixed> $q @param list<mixed> $names
| |||
| private | typeQueryVar(array $q): void# |
| |||
| private | pagename(array $q): void# | A page path: the page it finds (in a hierarchical type queried), unless it is the posts page. @param array<string, mixed> $q
| |||
| private | ids(array $q): void# | An id or an id list, the parent or a parent list, and a page id that replaces all before it. @param array<string, mixed> $q
| |||
| private | authorName(array $q): void# |
| |||
| private | commentCount(array $q): void# |
|
Nothing matches.