Closed boonebgorges closed 4 years ago
@boonebgorges I'm considering working on this feature. Is the meta update the only command to add?
Also, could you share what types of meta one would usually update? Don't want to overboard.
It would be nice to mirror WP-CLI's meta commands:
$ wp post meta
usage: wp post meta add <id> <key> [<value>] [--format=<format>]
or: wp post meta delete <id> [<key>] [<value>] [--all]
or: wp post meta get <id> <key> [--format=<format>]
or: wp post meta list <id> [--keys=<keys>] [--fields=<fields>] [--format=<format>] [--orderby=<fields>] [--order=<order>]
or: wp post meta patch <action> <id> <key> <key-path>... [<value>] [--format=<format>]
or: wp post meta pluck <id> <key> <key-path>... [--format=<format>]
or: wp post meta update <id> <key> [<value>] [--format=<format>]
I wonder if there's a way we can extend CommandWithMeta
. See wp comment meta
https://github.com/wp-cli/entity-command/blob/master/src/Comment_Meta_Command.php and the base class https://github.com/wp-cli/entity-command/blob/master/src/WP_CLI/CommandWithMeta.php
Interesting! Will take a look soon!
Closing this since this command is being added and documented on #76
Would be great to have metadata commands:
wp bp group meta update
etc.