Skip to content

Commit e000763

Browse files
authored
Merge pull request #22 from wp-cli/format-docs
Use structured argument definition for `--format=<format>`
2 parents 8489bc2 + 78b9824 commit e000763

3 files changed

Lines changed: 36 additions & 4 deletions

File tree

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,15 @@ wp plugin update [<plugin>...] [--all] [--minor] [--patch] [--format=<format>] [
544544
Only perform updates for patch releases (e.g. from 1.3 to 1.3.3 instead of 1.4)
545545

546546
[--format=<format>]
547-
Output summary as table or summary. Defaults to table.
547+
Render output in a particular format.
548+
---
549+
default: table
550+
options:
551+
- table
552+
- csv
553+
- json
554+
- summary
555+
---
548556

549557
[--version=<version>]
550558
If set, the plugin will be updated to the specified version.
@@ -1123,7 +1131,15 @@ wp theme update [<theme>...] [--all] [--format=<format>] [--version=<version>] [
11231131
If set, all themes that have updates will be updated.
11241132

11251133
[--format=<format>]
1126-
Output summary as table or summary. Defaults to table.
1134+
Render output in a particular format.
1135+
---
1136+
default: table
1137+
options:
1138+
- table
1139+
- csv
1140+
- json
1141+
- summary
1142+
---
11271143

11281144
[--version=<version>]
11291145
If set, the theme will be updated to the specified version.

src/Plugin_Command.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,15 @@ protected function install_from_repo( $slug, $assoc_args ) {
509509
* : Only perform updates for patch releases (e.g. from 1.3 to 1.3.3 instead of 1.4)
510510
*
511511
* [--format=<format>]
512-
* : Output summary as table or summary. Defaults to table.
512+
* : Render output in a particular format.
513+
* ---
514+
* default: table
515+
* options:
516+
* - table
517+
* - csv
518+
* - json
519+
* - summary
520+
* ---
513521
*
514522
* [--version=<version>]
515523
* : If set, the plugin will be updated to the specified version.

src/Theme_Command.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,15 @@ public function get( $args, $assoc_args ) {
594594
* : Comma separated list of theme names that should be excluded from updating.
595595
*
596596
* [--format=<format>]
597-
* : Output summary as table or summary. Defaults to table.
597+
* : Render output in a particular format.
598+
* ---
599+
* default: table
600+
* options:
601+
* - table
602+
* - csv
603+
* - json
604+
* - summary
605+
* ---
598606
*
599607
* [--version=<version>]
600608
* : If set, the theme will be updated to the specified version.

0 commit comments

Comments
 (0)