API / Minn\Runtime / TermTags

TermTags final class

Minn\Runtime\TermTags · public/minn/src/Minn/Runtime/TermTags.php · 128 lines

What WordPress's template tags tell about a post's terms: its terms of a taxonomy (as a list primed them, else read), its categories with their old field names, its tags, its format, and a category's address and the chain of its parents.

Constants and properties

privateCATEGORY_FIELDS = array ( 'cat_ID' => 'term_id', 'category_count' => 'count', 'category_description' => 'description', 'cat_name' => 'name', 'category_nicename' => 'slug', 'category_parent' => 'parent', )

A category's old field names, each with the term field it mirrors, in the order they are added.

Public

staticcached(mixed $id, mixed $taxonomy): mixed#

The terms of a post that a list primed or the object cache holds (get_object_term_cache), each through get_term; false when nothing holds them.

staticofPost(mixed $post, mixed $taxonomy): mixed#

A post's terms of a taxonomy (get_the_terms), as get_the_terms leaves them; false for none or no post.

staticcategories(mixed $postId = false): mixed#

A post's categories (get_the_category), each with its old field names, as get_the_categories leaves them.

statictags(mixed $post = 0): mixed#

A post's tags (get_the_tags), as get_the_tags leaves them.

staticformat(mixed $post = NULL): mixed#

A post's format (get_post_format): its post_format term's slug without the prefix; false for none or a type without formats.

staticcategoryFields(mixed $category): void#

A category's old field names beside its term fields (_make_cat_compat), on a term object or a term array alike.

staticcategoryLink(mixed $category): mixed#

A category's address (get_category_link), empty for none.

staticcategoryParents(mixed $categoryId, mixed $link = false, mixed $separator = '/', mixed $nicename = false, mixed $deprecated = array ( )): mixed#

A category's parents and itself, outermost first (get_category_parents), as names or slugs, linked or not, with the separator after each; the error for an unknown category.