Skip to content

Conversation

@schlessera
Copy link
Member

@schlessera schlessera commented Jan 19, 2018

This needs wp-cli/wp-cli#4623 to land first.

See wp-cli/wp-cli#4616

@schlessera schlessera requested a review from a team January 19, 2018 13:00
@schlessera schlessera added the command:post-create Related to 'post create' command label Jan 19, 2018
@schlessera schlessera changed the title Add shell array parsing to --tax_input & --meta_input Implement --meta_input with post create & post update Jan 22, 2018
@schlessera schlessera added the command:post-update Related to 'post update' command label Jan 22, 2018
@schlessera schlessera added this to the 1.2.0 milestone Jan 22, 2018
The `meta_input` argument to `wp_insert_post()` was introduced with WordPress 4.4.0.
* Success: Created post 1922.
*
* # Create a post with multiple meta values.
* $ wp post create --post_title='A post' --post_content='Just a small post.' --meta_input='{"key1":"value1","key2":"value2"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ' is not balanced here.

--meta_input='{"key1":"value1","key2":"value2"}'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been fixed a while ago in #147.

* Success: Updated post 123.
*
* # Update a post with multiple meta values.
* $ wp post update 123 --meta_input='{"key1":"value1","key2":"value2"}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ' is not balanced here.

it should be :
--meta_input='{"key1":"value1","key2":"value2"}'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:post-create Related to 'post create' command command:post-update Related to 'post update' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants