-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new --meta_format to wp post meta
commands
#142
Comments
The technical term for a |
Given See also |
wp post meta
commandswp post meta
commands
wp post meta
commandswp post meta
commands
Current workaround: But another problem is that contrary to |
Hi, i have same issue, do you find solution ? |
@danielbachhuber are we looking for this command here?
|
@BhargavBhandari90 Honestly, I'm not sure how we should solve this problem, or whether it's a problem worth solving. Exporting I'd be curious to hear more about the use case of exporting post meta for use with |
(dumping, debugging, backup'ing, importing) |
@drzraf Makes sense. For lack of a better solution, I think I'd lean towards a special-case What should happen when two entries exist for the same meta key? |
|
Another option to throw in the mix: introduce something like |
According to the WP-CLI 1.5.0 Announcement:
Unfortunately, there doesn't seem to be an equivalent export option for
post meta list
orpost meta get
.wp post meta list 123 --fields=meta_key,meta_value --format=json
will create[{"meta_key":"foo", "meta_value":"bar}]
and not{"foo":"bar"}
as shown in the examples forpost update
andpost create
.post meta list
post meta get
A suggestion has been made to add a new
--format=meta_input
or similar.While the argument
meta_input
makes sense to solve this particular issue (based on import) it doesn't really describe the export type which is<key>:<value>
JSON.--format=meta_input
--format=json-key-value
--format=json-key:value
--format=jsonkv
--format=json-kv
The text was updated successfully, but these errors were encountered: