pfeifferNet

Taxonomy
in package

Provide additional taxonomy functions.

  • Return an array of terms in the taxonomy sorted by specified key.
  • List links to terms in the taxonomy.
Tags
since
5.5.0
5.11.0

Deprecated global singleton.

5.13.0

Add get_terms for terms in the taxonomy.

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

Table of Contents

Constants

TAX_SEQUENCE_KEY  : array<string|int, mixed> = 'pnet_sequence'
Define taxonomy term preferred sequence key name.
TV_DEFAULTS  : mixed = array('childless' => false, 'hide_empty' => tru...
The default term selection query variables.

Properties

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

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>
  • Return an array of term objects.
  • Array will be sorted by the 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()
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.

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

__construct()

Initialise the class.

protected __construct() : void
Tags
since
5.11.0

        
On this page

Search results