Advertisements

get_taxonomies

Definition:
function get_taxonomies( $args = array() {}

Get a list of registered taxonomy objects.

Parameters

  • array $args: An array of key => value arguments to match against the taxonomy objects.
  • string $output: The type of output to return, either taxonomy ‘names’ or ‘objects’. ‘names’ is the default.
  • string $operator: The logical operation to perform. ‘or’ means only one element from the array needs to match; ‘and’ means all elements must match. The default is ‘and’.

Return values

returns:A list of taxonomy names or objects

Source code

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

	global $wp_taxonomies;



	$field = ('names' == $output) ? 'name' : false;



	return wp_filter_object_list($wp_taxonomies, $args, $operator, $field);

}

1729

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: