Skip to content

Commit bbc4c83

Browse files
committed
Add examples to dcoblocks.
1 parent 6a95ea5 commit bbc4c83

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Post_Command.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ public function __construct() {
143143
* # Create post with content from given file
144144
* $ wp post create ./post-content.txt --post_category=201,345 --post_title='Post from file'
145145
* Success: Created post 1922.
146+
*
147+
* # Create a post with multiple meta values.
148+
* $ wp post create --post_title='A post' --post_content='Just a small post.' --meta_input='{"key1":"value1","key2":"value2"}
149+
* Success: Created post 1923.
146150
*/
147151
public function create( $args, $assoc_args ) {
148152
if ( ! empty( $args[0] ) ) {
@@ -271,6 +275,10 @@ public function create( $args, $assoc_args ) {
271275
*
272276
* $ wp post update 123 --post_name=something --post_status=draft
273277
* Success: Updated post 123.
278+
*
279+
* # Update a post with multiple meta values.
280+
* $ wp post update 123 --meta_input='{"key1":"value1","key2":"value2"}
281+
* Success: Updated post 123.
274282
*/
275283
public function update( $args, $assoc_args ) {
276284

0 commit comments

Comments
 (0)