pfeifferNet

Taxonomy
in package

Provide additional taxonomy admin functions.

  • Export the terms for a particular taxonomy.
  • List public taxonomy names and labels.
Tags
since
6.8.0
used-by
Taxonomy_Export
Taxonomy_Export::__construct()

Table of Contents

Constants

BASE_FIELDS  : array<string|int, mixed> = array('term_id', 'name', 'slug', 'description',...
The basic fields from the get_terms() function.
COMMON_FIELDS  : array<string|int, mixed> = array('rank_math_seo_score')
The common term metadata fields to get values for.
FIELD_DELIMITER  : mixed = '|'
The field delimiter for the export file.

Properties

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

Methods

get_export()  : string
Get the taxonomy terms export.
get_instance()  : object
Creates and/or returns the instance of this class.
get_titles()  : array<string|int, mixed>
Get the list of taxonomy title labels.
__construct()  : void
Initialise the class.

Constants

BASE_FIELDS

The basic fields from the get_terms() function.

protected array<string|int, mixed> BASE_FIELDS = array('term_id', 'name', 'slug', 'description', 'parent', 'count')

The target fields from the get_terms() function.

Tags
since
6.8.0

COMMON_FIELDS

The common term metadata fields to get values for.

protected array<string|int, mixed> COMMON_FIELDS = array('rank_math_seo_score')
  • These are the termmeta entries always included in the export file.

The target fields to get values for.

Tags
since
6.8.0

FIELD_DELIMITER

The field delimiter for the export file.

protected mixed FIELD_DELIMITER = '|'
  • Several of the fields may contain commas or tabs, so a pipe character is used as the delimiter.
Tags
since
6.8.0

Properties

$instances

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

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

Methods

get_export()

Get the taxonomy terms export.

public get_export(string $taxonomy[, array<string|int, mixed> $addtional_fields = array() ]) : string
Parameters
$taxonomy : string

The taxonomy for which to export terms.

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

The keys to the additional fields to include in the export.

Tags
since
6.8.0
used-by
Taxonomy_Export::handle_ajax_request()
Return values
string

The taxonomy terms delimited file contents.

get_instance()

Creates and/or returns the instance of this class.

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

The instance of this class.

get_titles()

Get the list of taxonomy title labels.

public get_titles() : array<string|int, mixed>
Tags
since
6.8.0
used-by
Taxonomy_Export::init_tool()
Return values
array<string|int, mixed>

The array of taxonomy title labels, keyed by taxonomy name, sorted by label.

__construct()

Initialise the class.

protected __construct() : void
Tags
since
6.8.0

        
On this page

Search results