Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/Post_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ public function __construct() {
* # Create post with content from given file
* $ wp post create ./post-content.txt --post_category=201,345 --post_title='Post from file'
* 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: Created post 1923.
*/
public function create( $args, $assoc_args ) {
if ( ! empty( $args[0] ) ) {
Expand Down Expand Up @@ -271,6 +275,10 @@ public function create( $args, $assoc_args ) {
*
* $ wp post update 123 --post_name=something --post_status=draft
* 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!

* Success: Updated post 123.
*/
public function update( $args, $assoc_args ) {

Expand Down