Term
in package
Provide additional taxonomy terms functions.
- Provide term metadata.
Tags
Table of Contents
Properties
- $instances : array<string|int, object>
- The array of instances of this class and sub-classes.
Methods
- get_data() : array<string|int, mixed>
- Return the term data and metadata.
- get_instance() : object
- Creates and/or returns the instance of this class.
- __construct() : void
- Initialise the class.
Properties
$instances
The array of instances of this class and sub-classes.
protected
static array<string|int, object>
$instances
= array()
Tags
Methods
get_data()
Return the term data and metadata.
public
get_data(int|string $term_id[, string $taxonomy = '' ]) : array<string|int, mixed>
Parameters
- $term_id : int|string
-
The term id for the data.
- $taxonomy : string = ''
-
Optional. The term taxonomy.
Tags
Return values
array<string|int, mixed> —$data { The term data and metadata. This may also include metadata added by other plugins. @type int $term_id The term id. @type string $name The term name. @type string $slug The term slug. @type int $term_group The id of the term group. @type int $term_taxonomy_id The term-taxonomy id. @type string $taxonomy The taxonomy name. @type string $description The term description. @type int $parent The id of the parent term. @type int $count The number of entries in this taxonomy term. @type string $filter The content filter used by the query. Usually 'raw'. @type string $pnet_excerpt The term short description. @type int $pnet_image_id The term featured image. @type int $pnet_sequence The preferred sort order position. @type string $url The url of the term archive page. }
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.
__construct()
Initialise the class.
protected
__construct() : void