Taxonomy
in package
Provide additional taxonomy functions.
List links to terms in the taxonomy.
Tags
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
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
Properties
$instances
The array of instances of this class and sub-classes.
protected
static array<string|int, object>
$instances
= array()
Tags
$link_list
The instance of the Link_List class.
protected
Link_List
$link_list
Tags
Methods
get_instance()
Creates and/or returns the instance of this class.
public
static get_instance() : object
Tags
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
Return values
array<string|int, WP_Term> —An array of selected terms.
render_links()
Render the list of term links.
public
render_links(string $taxonomy) : void
Parameters
- $taxonomy : string
-
The taxonomy to use for the list.
Tags
__construct()
Initialise the class.
protected
__construct() : void