public function list_( $args, $assoc_args ) {
		$formatter = $this->get_formatter( $assoc_args );

		if ( isset( $assoc_args['object_type'] ) ) {
			$assoc_args['object_type'] = array( $assoc_args['object_type'] );
		}

		$fields     = $formatter->fields;
		$taxonomies = get_taxonomies( $assoc_args, 'objects' );
		$counts     = [];

		if ( count( $taxonomies ) > 0 && in_array( 'count', $fields, true ) ) {
			$counts = $this->get_counts( wp_list_pluck( $taxonomies, 'name' ) );
		}

		$taxonomies = array_map(
			function( $taxonomy ) use ( $counts ) {
					$taxonomy->object_type = implode( ', ', $taxonomy->object_type );
					$taxonomy->count       = isset( $counts[ $taxonomy->name ] ) ? $counts[ $taxonomy->name ] : 0;
					return $taxonomy;
			},
			$taxonomies
		);

		$formatter->display_items( $taxonomies );
	}
public function list_( $args, $assoc_args ) {
		$formatter = $this->get_formatter( $assoc_args );

		if ( isset( $assoc_args['object_type'] ) ) {
			$assoc_args['object_type'] = array( $assoc_args['object_type'] );
		}

		$fields     = $formatter->fields;
		$taxonomies = get_taxonomies( $assoc_args, 'objects' );
		$counts     = [];

		if ( count( $taxonomies ) > 0 && in_array( 'count', $fields, true ) ) {
			$counts = $this->get_counts( wp_list_pluck( $taxonomies, 'name' ) );
		}

		$taxonomies = array_map(
			function( $taxonomy ) use ( $counts ) {
					$taxonomy->object_type = implode( ', ', $taxonomy->object_type );
					$taxonomy->count       = isset( $counts[ $taxonomy->name ] ) ? $counts[ $taxonomy->name ] : 0;
					return $taxonomy;
			},
			$taxonomies
		);

		$formatter->display_items( $taxonomies );
	}
public function list_ ( $ args , $ assoc_args ) { $ formatter = $ this -> get_formatter ( $ assoc_args ) ; if ( isset ( $ assoc_args [ 'object_type' ] ) ) { $ assoc_args [ 'object_type' ] = array ( $ assoc_args [ 'object_type' ] ) ; } $ fields = $ formatter -> fields ; $ taxonomies = get_taxonomies ( $ assoc_args , 'objects' ) ; $ counts = [ ] ; if ( count ( $ taxonomies ) > 0 && in_array ( 'count' , $ fields , true ) ) { $ counts = $ this -> get_counts ( wp_list_pluck ( $ taxonomies , 'name' ) ) ; } $ taxonomies = array_map ( function ( $ taxonomy ) use ( $ counts ) { $ taxonomy -> object_type = implode ( ', ' , $ taxonomy -> object_type ) ; $ taxonomy -> count = isset ( $ counts [ $ taxonomy -> name ] ) ? $ counts [ $ taxonomy -> name ] : 0 ; return $ taxonomy ; } , $ taxonomies ) ; $ formatter -> display_items ( $ taxonomies ) ; }
Lists registered taxonomies.

## OPTIONS

[--<field>=<value>]
: Filter by one or more fields (see get_taxonomies() first parameter for a list of available fields).

[--field=<field>]
: Prints the value of a single field for each taxonomy.

[--fields=<fields>]
: Limit the output to specific taxonomy fields.

[--format=<format>]
: Render output in a particular format.
---
default: table
options:
- table
- csv
- json
- count
- yaml
---

## AVAILABLE FIELDS

These fields will be displayed by default for each term:

* name
* label
* description
* object_type
* show_tagcloud
* hierarchical
* public

These fields are optionally available:

* count

## EXAMPLES

# List all taxonomies.
$ wp taxonomy list --format=csv
name,label,description,object_type,show_tagcloud,hierarchical,public
category,Categories,,post,1,1,1
post_tag,Tags,,post,1,,1
nav_menu,"Navigation Menus",,nav_menu_item,,,
link_category,"Link Categories",,link,1,,
post_format,Format,,post,,,1

# List all taxonomies with 'post' object type.
$ wp taxonomy list --object_type=post --fields=name,public
+-------------+--------+
| name        | public |
+-------------+--------+
| category    | 1      |
| post_tag    | 1      |
| post_format | 1      |
+-------------+--------+

@subcommand list
Lists registered taxonomies .