if ( !is_array( $all_items ) )
\WP_CLI::error( "No {$this->item_type}s found." );
- foreach( $all_items as $key => &$item ) {
+ foreach ( $all_items as $key => &$item ) {
if ( empty( $item['version'] ) )
$item['version'] = '';
}
}
- foreach( $this->obj_fields as $field ) {
-
+ foreach ( $this->obj_fields as $field ) {
if ( isset( $assoc_args[$field] )
&& $assoc_args[$field] != $item[$field] )
unset( $all_items[$key] );
-
}
-
}
$formatter = $this->get_formatter( $assoc_args );
* Get a list of plugins.
*
* ## OPTIONS
- *
+ *
* [--<field>=<value>]
* : Filter results based on the value of a field.
*
*
* ## EXAMPLES
*
- * wp plugin list --format=json
+ * wp plugin list --status=active --format=json
*
* @subcommand list
*/
* Get a list of themes.
*
* ## OPTIONS
- *
+ *
* [--<field>=<value>]
* : Filter results based on the value of a field.
*
*
* ## EXAMPLES
*
- * wp theme list --format=csv
+ * wp theme list --status=inactive --format=csv
*
* @subcommand list
*/