public function get( $args, $assoc_args ) {
		$plugin = $this->fetcher->get_check( $args[0] );
		$file   = $plugin->file;

		$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $file, false, false );

		$plugin_obj = (object) [
			'name'        => Utils\get_plugin_name( $file ),
			'title'       => $plugin_data['Name'],
			'author'      => $plugin_data['Author'],
			'version'     => $plugin_data['Version'],
			'description' => wordwrap( $plugin_data['Description'] ),
			'status'      => $this->get_status( $file ),
		];

		if ( empty( $assoc_args['fields'] ) ) {
			$plugin_array         = get_object_vars( $plugin_obj );
			$assoc_args['fields'] = array_keys( $plugin_array );
		}

		$formatter = $this->get_formatter( $assoc_args );
		$formatter->display_item( $plugin_obj );
	}
public function get( $args, $assoc_args ) {
		$plugin = $this->fetcher->get_check( $args[0] );
		$file   = $plugin->file;

		$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $file, false, false );

		$plugin_obj = (object) [
			'name'        => Utils\get_plugin_name( $file ),
			'title'       => $plugin_data['Name'],
			'author'      => $plugin_data['Author'],
			'version'     => $plugin_data['Version'],
			'description' => wordwrap( $plugin_data['Description'] ),
			'status'      => $this->get_status( $file ),
		];

		if ( empty( $assoc_args['fields'] ) ) {
			$plugin_array         = get_object_vars( $plugin_obj );
			$assoc_args['fields'] = array_keys( $plugin_array );
		}

		$formatter = $this->get_formatter( $assoc_args );
		$formatter->display_item( $plugin_obj );
	}
public function get ( $ args , $ assoc_args ) { $ plugin = $ this -> fetcher -> get_check ( $ args [ 0 ] ) ; $ file = $ plugin -> file ; $ plugin_data = get_plugin_data ( WP_PLUGIN_DIR . '/' . $ file , false , false ) ; $ plugin_obj = ( object ) [ 'name' => Utils \ get_plugin_name ( $ file ) , 'title' => $ plugin_data [ 'Name' ] , 'author' => $ plugin_data [ 'Author' ] , 'version' => $ plugin_data [ 'Version' ] , 'description' => wordwrap ( $ plugin_data [ 'Description' ] ) , 'status' => $ this -> get_status ( $ file ) , ] ; if ( empty ( $ assoc_args [ 'fields' ] ) ) { $ plugin_array = get_object_vars ( $ plugin_obj ) ; $ assoc_args [ 'fields' ] = array_keys ( $ plugin_array ) ; } $ formatter = $ this -> get_formatter ( $ assoc_args ) ; $ formatter -> display_item ( $ plugin_obj ) ; }
Gets details about an installed plugin.

## OPTIONS

<plugin>
: The plugin to get.

[--field=<field>]
: Instead of returning the whole plugin, returns the value of a single field.

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

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

## EXAMPLES

$ wp plugin get bbpress --format=json
{"name":"bbpress","title":"bbPress","author":"The bbPress Contributors","version":"2.6-alpha","description":"bbPress is forum software with a twist from the creators of WordPress.","status":"active"}
Gets details about an installed plugin .