WPDev.one
Core Function
View Source on Trac ↗

get_taxonomies()

get_taxonomies( mixed $args = array(), mixed $output = 'names', mixed $operator = 'and' )

Retrieves a list of registered taxonomy names or objects.

Parameters 3 required

Name / Type Description
array

$args Optional. An array of `key => value` arguments to match against the taxonomy objects. Default empty array.

Required
string

$output Optional. The type of output to return in the array. Either 'names' or 'objects'. Default 'names'.

Required
string

$operator Optional. The logical operation to perform. Accepts 'and' or 'or'. 'or' means only one element from the array needs to match; 'and' means all elements must match. Default 'and'.

Required

Return Value

((string[])
| WP_Taxonomy[]) An array of taxonomy names or objects.

Function Information

Since Version
3.0.0
Source File
wp-includes/taxonomy.php
Advertisement