wp-cli/wp-cli — pull request #1196 by danielbachhuber (2014-05-18 16:57:17+00:00)
Title: `widget list` with format=ids not working

Running with the phar build version 0.15.0.

Listing the widgets works fine formatted as table, json, csv, but it does not work with the format `ids`. Would be nice if the `widgets list` command would follow the same convention like `post list`, `term list`, etc. so we can execute a similar removal command:

```
php /opt/wp-cli.phar widget delete sidebar-id $(php /opt/wp-cli.phar widget list sidebar-id --format=ids)

php /opt/wp-cli.phar post delete $(php /opt/wp-cli.phar post list --format=ids)
```

Trying the format `ids` with version 0.15.0 gives an error:

```
$ php /opt/wp-cli.phar widget list sidebar-blog --format=ids
Catchable fatal error: Object of class stdClass could not be converted to string in phar:///opt/wp-cli.phar/php/WP_CLI/Formatter.php on line 69
```

```
$ php /opt/wp-cli.phar widget list sidebar-blog
+-----------------+-------------------+----------+----------------------------------------------------------------+
| name | id | position | options |
+-----------------+-------------------+----------+----------------------------------------------------------------+
| categories | categories-2 | 1 | {"title":"Categories","count":0,"hierarchical":0,"dropdown":0} |
| tag_cloud | tag_cloud-2 | 2 | {"title":"Tags","taxonomy":"post_tag"} |
| recent-posts | recent-posts-2 | 3 | {"title":"Recents","number":5,"show_date":false} |
| recent-comments | recent-comments-2 | 4 | {"title":"Comments","number":5} |
+-----------------+-------------------+----------+----------------------------------------------------------------+
```