pfeifferNet

Taxonomy
in package

Provide additional taxonomy functions.

List links to terms in the taxonomy.

Tags
since
5.5.0
since
5.11.0

Deprecated global singleton.

since
5.13.0

Add get_terms for terms in the taxonomy.

used-by
Chapter::__construct()
used-by
Term_Grid::__construct()

Table of Contents

Constants

TAX_SEQUENCE_KEY  = 'pnet_sequence'
Define taxonomy term preferred sequence key name.
TV_DEFAULTS  = array('childless' => false, 'hide_empty' => true, 'order' => 'ASC', 'orderby' => 'name', 'parent' => '', 'taxonomy' => '')
The default term selection query variables.

Properties

$instances  : array<string|int, object>
The array of instances of this class and sub-classes.
$link_list  : Link_List
The instance of the Link_List class.

Methods

get_instance()  : object
Creates and/or returns the instance of this class.
get_terms()  : array<string|int, WP_Term>
Get the taxonomy terms.
render_links()  : void
Render the list of term links.
__construct()  : void
Initialise the class.

Constants

TAX_SEQUENCE_KEY

Define taxonomy term preferred sequence key name.

protected array<string|int, mixed> TAX_SEQUENCE_KEY = 'pnet_sequence'
Tags
since
5.13.0

TV_DEFAULTS

The default term selection query variables.

protected mixed TV_DEFAULTS = array('childless' => false, 'hide_empty' => true, 'order' => 'ASC', 'orderby' => 'name', 'parent' => '', 'taxonomy' => '')
Tags
since
5.13.0

Properties

$instances

The array of instances of this class and sub-classes.

protected static array<string|int, object> $instances = array()
Tags
since
5.11.0

Methods

get_instance()

Creates and/or returns the instance of this class.

public static get_instance() : object
Tags
since
5.11.0
Return values
object

The instance of this class.

get_terms()

Get the taxonomy terms.

public get_terms([array<string|int, mixed> $args = array() ]) : array<string|int, WP_Term>

This returns an array of term objects. It will be sorted by specified key. Defaults to name.

Parameters
$args : array<string|int, mixed> = array()

The taxonomy term selection arguments.

Tags
since
5.13.0
see
Taxonomy::TV_DEFAULTS
used-by
Chapter::get_chapters()
used-by
Term_Grid::get_terms()
Return values
array<string|int, WP_Term>

An array of selected terms.

Render the list of term links.

public render_links(string $taxonomy) : void
Parameters
$taxonomy : string

The taxonomy to use for the list.

Tags
since
5.5.0
uses
Link_List::render()
used-by
List_Terms::the_content()

        
On this page

Search results