API / Minn\Runtime / PostQueryTax

PostQueryTax final class

Minn\Runtime\PostQueryTax · public/minn/src/Minn/Runtime/PostQueryTax.php · 193 lines

The taxonomy side of WP_Query as the reference runs it (probe wp-query-sql): the clauses its variables make (tax_query, taxonomy and term, each taxonomy's query var, cat and the category__ lists, tag and the tag__ lists), settled back into the variables; the post types a taxonomy archive with no type searches; and the cat, category_name, tag_id, taxonomy and term variables set from the terms queried.

Used by 1

Public

staticclauses(WP_Query $query, array $q): array#

The tax query a set of variables makes, settling the variables it reads.

$qarray<string, mixed>
@return list<array<string, mixed>>|array<string, mixed>
staticpostTypes(array $taxonomies): array|string#

The post types a taxonomy archive with no type searches: every searchable type the queried taxonomies are registered for, one as a string, several sorted, none as `any`.

$taxonomieslist<string>
@return string|list<string>
staticcompat(WP_Query $query, array $q, array $queried): void#

The compatibility variables the queried terms set: taxonomy and term (or term_id) from the first taxonomy other than category and post_tag when none is set, and cat, category_name and tag_id from those two.

$queriedarray<string, array{terms?: list<mixed>, field?: string}>

Internals 5

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

privatequeryVar(array $q, string $name, object $taxonomy): array#
@return list<array<string, mixed>>
privatecat(array $q): array#
@return list<array<string, mixed>>
privatecategoryLists(array $q): array#
@return list<array<string, mixed>>
privatetag(array $q): void#

The tag variable as tag_slug__in or tag_slug__and.

privatetagLists(array $q): array#
@return list<array<string, mixed>>