entity-command icon indicating copy to clipboard operation
entity-command copied to clipboard

Accept multiple key/value pairs in post meta add/update.

Open gitlost opened this issue 7 years ago • 2 comments

Originally from @killown https://github.com/wp-cli/wp-cli/issues/4621

It would be useful for performance reasons to be able to add/update multiple key/value pairs in post meta add and post meta update.

See also https://github.com/wp-cli/wp-cli/issues/4616, which would give an alternative method via --meta_input.

gitlost avatar Jan 19 '18 10:01 gitlost

This would now work with the latest master through the use of JSON notation added to --meta_input:

wp post update <id> --meta_input='{"key1":"value1","key2":"value2",...}'

schlessera avatar Jan 22 '18 15:01 schlessera

Thanks a lot for implement this feature, now wp cli is 10 faster depending on how many meta updates we are dealing with

killown avatar Jan 23 '18 15:01 killown