public function list_( $args, $assoc_args ) {

		$defaults   = [
			'format' => 'table',
		];
		$assoc_args = array_merge( $defaults, $assoc_args );

		$object_id      = array_shift( $args );
		$taxonomy_names = $args;
		$taxonomy_args  = [];

		$this->set_obj_id( $object_id );

		foreach ( $taxonomy_names as $taxonomy ) {
			$this->taxonomy_exists( $taxonomy );
		}

		if ( 'ids' === $assoc_args['format'] ) {
			$taxonomy_args['fields'] = 'ids';
		}

		$items = wp_get_object_terms( $object_id, $taxonomy_names, $taxonomy_args );

		$formatter = $this->get_formatter( $assoc_args );
		$formatter->display_items( $items );

	}
public function list_( $args, $assoc_args ) {

		$defaults   = [
			'format' => 'table',
		];
		$assoc_args = array_merge( $defaults, $assoc_args );

		$object_id      = array_shift( $args );
		$taxonomy_names = $args;
		$taxonomy_args  = [];

		$this->set_obj_id( $object_id );

		foreach ( $taxonomy_names as $taxonomy ) {
			$this->taxonomy_exists( $taxonomy );
		}

		if ( 'ids' === $assoc_args['format'] ) {
			$taxonomy_args['fields'] = 'ids';
		}

		$items = wp_get_object_terms( $object_id, $taxonomy_names, $taxonomy_args );

		$formatter = $this->get_formatter( $assoc_args );
		$formatter->display_items( $items );

	}
public function list_ ( $ args , $ assoc_args ) { $ defaults = [ 'format' => 'table' , ] ; $ assoc_args = array_merge ( $ defaults , $ assoc_args ) ; $ object_id = array_shift ( $ args ) ; $ taxonomy_names = $ args ; $ taxonomy_args = [ ] ; $ this -> set_obj_id ( $ object_id ) ; foreach ( $ taxonomy_names as $ taxonomy ) { $ this -> taxonomy_exists ( $ taxonomy ) ; } if ( 'ids' === $ assoc_args [ 'format' ] ) { $ taxonomy_args [ 'fields' ] = 'ids' ; } $ items = wp_get_object_terms ( $ object_id , $ taxonomy_names , $ taxonomy_args ) ; $ formatter = $ this -> get_formatter ( $ assoc_args ) ; $ formatter -> display_items ( $ items ) ; }
List all terms associated with an object.

<id>
: ID for the object.

<taxonomy>...
: One or more taxonomies to list.

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

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

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

## AVAILABLE FIELDS

These fields will be displayed by default for each term:

* term_id
* name
* slug
* taxonomy

These fields are optionally available:

* term_taxonomy_id
* description
* term_group
* parent
* count

@subcommand list
List all terms associated with an object .