WordPress.org

Make WordPress Core

Opened 22 months ago

Last modified 22 months ago

#43685 closed defect (bug)

wp post meta missing options — at Initial Version

Reported by: apb1963 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:
PR Number:

Description

Not sure if this is the right place, however...

The following command needs an option that eliminates the ASCII graphics, such as a --porcelain option, and/or --field option (singular). Only --fields (plural) is valid and brings the graphics with it. --format=ids is also missing/broken.

In short, in the following example, I need the output of the wp post meta list to be "168", without quotes - nothing more, nothing less.

wp post meta list 203 --keys=_thumbnail_id --field=meta_value
Error: Parameter errors:

unknown --field parameter

Did you mean '--fields'?

wp post meta list 203 --keys=_thumbnail_id --fields=meta_value
+------------+
| meta_value |
+------------+
| 168 |
+------------+

wp post meta list 203 --keys=_thumbnail_id --fields=meta_value --format=ids
PHP Catchable fatal error: Object of class stdClass could not be converted to string in phar:///data/local/bin/wp/php/WP_CLI/Formatter.php on line 139
Catchable fatal error: Object of class stdClass could not be converted to string in phar:///data/local/bin/wp/php/WP_CLI/Formatter.php on line 139

Change History (0)

Note: See TracTickets for help on using tickets.