Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
122 changes: 109 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,14 @@ wp comment meta get <id> <key> [--format=<format>]
The name of the meta field to get.

[--format=<format>]
Accepted values: table, json. Default: table
Get value in a particular format.
---
default: var_export
options:
- var_export
- json
- yaml
---



Expand All @@ -465,7 +472,16 @@ wp comment meta list <id> [--keys=<keys>] [--fields=<fields>] [--format=<format>
Limit the output to specific row fields. Defaults to id,meta_key,meta_value.

[--format=<format>]
Accepted values: table, csv, json, count. Default: table
Render output in a particular format.
---
default: table
options:
- table
- csv
- json
- yaml
- count
---

[--orderby=<fields>]
Set orderby which field.
Expand Down Expand Up @@ -1407,7 +1423,14 @@ wp network meta get <id> <key> [--format=<format>]
The name of the meta field to get.

[--format=<format>]
Accepted values: table, json. Default: table
Get value in a particular format.
---
default: var_export
options:
- var_export
- json
- yaml
---



Expand All @@ -1431,7 +1454,16 @@ wp network meta list <id> [--keys=<keys>] [--fields=<fields>] [--format=<format>
Limit the output to specific row fields. Defaults to id,meta_key,meta_value.

[--format=<format>]
Accepted values: table, csv, json, count. Default: table
Render output in a particular format.
---
default: table
options:
- table
- csv
- json
- yaml
- count
---

[--orderby=<fields>]
Set orderby which field.
Expand Down Expand Up @@ -1702,7 +1734,7 @@ wp option get <key> [--format=<format>]
Lists options and their values.

~~~
wp option list [--search=<pattern>] [--exclude=<pattern>] [--autoload=<value>] [--transients] [--field=<field>] [--fields=<fields>] [--format=<format>] [--orderby=<fields>] [--order=<order>]
wp option list [--search=<pattern>] [--exclude=<pattern>] [--autoload=<value>] [--transients] [--unserialize] [--field=<field>] [--fields=<fields>] [--format=<format>] [--orderby=<fields>] [--order=<order>]
~~~

**OPTIONS**
Expand Down Expand Up @@ -2461,7 +2493,14 @@ wp post meta get <id> <key> [--format=<format>]
The name of the meta field to get.

[--format=<format>]
Accepted values: table, json. Default: table
Get value in a particular format.
---
default: var_export
options:
- var_export
- json
- yaml
---



Expand All @@ -2485,7 +2524,16 @@ wp post meta list <id> [--keys=<keys>] [--fields=<fields>] [--format=<format>] [
Limit the output to specific row fields. Defaults to id,meta_key,meta_value.

[--format=<format>]
Accepted values: table, csv, json, count. Default: table
Render output in a particular format.
---
default: table
options:
- table
- csv
- json
- yaml
- count
---

[--orderby=<fields>]
Set orderby which field.
Expand Down Expand Up @@ -2678,7 +2726,17 @@ wp post term list <id> <taxonomy>... [--field=<field>] [--fields=<fields>] [--fo
Limit the output to specific row fields.

[--format=<format>]
Accepted values: table, csv, json, count, ids. Default: table
Render output in a particular format.
---
default: table
options:
- table
- csv
- json
- yaml
- count
- ids
---

**AVAILABLE FIELDS**

Expand Down Expand Up @@ -3984,7 +4042,14 @@ wp term meta get <id> <key> [--format=<format>]
The name of the meta field to get.

[--format=<format>]
Accepted values: table, json. Default: table
Get value in a particular format.
---
default: var_export
options:
- var_export
- json
- yaml
---



Expand All @@ -4008,7 +4073,16 @@ wp term meta list <id> [--keys=<keys>] [--fields=<fields>] [--format=<format>] [
Limit the output to specific row fields. Defaults to id,meta_key,meta_value.

[--format=<format>]
Accepted values: table, csv, json, count. Default: table
Render output in a particular format.
---
default: table
options:
- table
- csv
- json
- yaml
- count
---

[--orderby=<fields>]
Set orderby which field.
Expand Down Expand Up @@ -4712,7 +4786,13 @@ wp user meta add <user> <key> <value> [--format=<format>]
The new metadata value.

[--format=<format>]
The serialization format for the value. Default is plaintext.
The serialization format for the value.
---
default: plaintext
options:
- plaintext
- json
---

**EXAMPLES**

Expand Down Expand Up @@ -4940,7 +5020,13 @@ wp user meta update <user> <key> <value> [--format=<format>]
The new metadata value.

[--format=<format>]
The serialization format for the value. Default is plaintext.
The serialization format for the value.
---
default: plaintext
options:
- plaintext
- json
---

**EXAMPLES**

Expand Down Expand Up @@ -5261,7 +5347,17 @@ wp user term list <id> <taxonomy>... [--field=<field>] [--fields=<fields>] [--fo
Limit the output to specific row fields.

[--format=<format>]
Accepted values: table, csv, json, count, ids. Default: table
Render output in a particular format.
---
default: table
options:
- table
- csv
- json
- yaml
- count
- ids
---

**AVAILABLE FIELDS**

Expand Down
16 changes: 14 additions & 2 deletions src/User_Meta_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,13 @@ public function delete( $args, $assoc_args ) {
* : The new metadata value.
*
* [--format=<format>]
* : The serialization format for the value. Default is plaintext.
* : The serialization format for the value.
* ---
* default: plaintext
* options:
* - plaintext
* - json
* ---
*
* ## EXAMPLES
*
Expand Down Expand Up @@ -199,7 +205,13 @@ public function add( $args, $assoc_args ) {
* : The new metadata value.
*
* [--format=<format>]
* : The serialization format for the value. Default is plaintext.
* : The serialization format for the value.
* ---
* default: plaintext
* options:
* - plaintext
* - json
* ---
*
* ## EXAMPLES
*
Expand Down
20 changes: 18 additions & 2 deletions src/WP_CLI/CommandWithMeta.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,16 @@ abstract class CommandWithMeta extends \WP_CLI_Command {
* : Limit the output to specific row fields. Defaults to id,meta_key,meta_value.
*
* [--format=<format>]
* : Accepted values: table, csv, json, count. Default: table
* : Render output in a particular format.
* ---
* default: table
* options:
* - table
* - csv
* - json
* - yaml
* - count
* ---
*
* [--orderby=<fields>]
* : Set orderby which field.
Expand Down Expand Up @@ -124,7 +133,14 @@ public function list_( $args, $assoc_args ) {
* : The name of the meta field to get.
*
* [--format=<format>]
* : Accepted values: table, json. Default: table
* : Get value in a particular format.
* ---
* default: var_export
* options:
* - var_export
* - json
* - yaml
* ---
*/
public function get( $args, $assoc_args ) {
list( $object_id, $meta_key ) = $args;
Expand Down
12 changes: 11 additions & 1 deletion src/WP_CLI/CommandWithTerms.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,17 @@ abstract class CommandWithTerms extends \WP_CLI_Command {
* : Limit the output to specific row fields.
*
* [--format=<format>]
* : Accepted values: table, csv, json, count, ids. Default: table
* : Render output in a particular format.
* ---
* default: table
* options:
* - table
* - csv
* - json
* - yaml
* - count
* - ids
* ---
*
* ## AVAILABLE FIELDS
*
Expand Down