TermLists final class
Minn\Front\TermLists · public/minn/src/Minn/Front/TermLists.php · 134 lines
A term's parent chain and the tag cloud, built from term rows the caller already fetched and links the caller resolves. The category list and select are the walkers' (Walker_Category, Walker_CategoryDropdown).
Public
| static | parentChain(array $line, bool $link, string $separator, bool $bySlug): string# | The chain of names from the outermost ancestor down to the term itself, each one separated and optionally wrapped in its own link. The separator trails the last name too, so a breadcrumb reads "Root/Mid/Leaf/".
| ||||||
| static | tagCloud(array $tags, array $args): ?string# | The tag cloud the reference prints, or null for none: the tags sorted and cut to the number asked for (cloudTags), each one's entry (cloudData), and the links (cloudMarkup). Each row brings its "id" (for the tag-link class; its key when it has none), "scaled" (its count through the scale callback), "text" (the count in words, for the label), and its link already escaped.
| ||||||
| static | cloudTags(array $tags, array $args): array# | The tags in the cloud's order (by name, or by count; random shuffles) and cut to the number asked for. Keys survive the sort; taking the first N renumbers the numeric ones before they name the tags.
@return array<array-key, array<string, mixed>> | ||||||
| static | cloudData(array $tags, array $args): array# | Each tag's entry, as wp_generate_tag_cloud_data is handed them (probe filter-inputs): id, url, role, name, the count in words and as a number, the link class, the font size, the label attribute and the shown count. Sizes step from smallest to largest across the scaled counts; a reversed range steps by one unit; an empty one leaves every tag the same size and drops the label, unless the counts are shown.
@return list<array<string, mixed>> | ||||||
| static | cloudMarkup(array $data, array $args): ?string# | The cloud from its entries (whatever wp_generate_tag_cloud_data made of them), in the format asked for, or null for none.
|
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | sorted(array $terms, string $orderby, string $order): array# | By name (natural, case-insensitive) only for "name"; every other value sorts by count. Only "DESC", in capitals, reverses.
|
Nothing matches.