Fix location of --format=<format> YAML docs

This commit is contained in:
Daniel Bachhuber 2017-12-11 05:59:38 -08:00
parent 43353544a7
commit 0957d764ee
2 changed files with 84 additions and 39 deletions

View file

@ -24,7 +24,7 @@ This package implements the following commands:
Profile each stage of the WordPress load process (bootstrap, main_query, template).
~~~
wp profile stage [<stage>] [--all] [--spotlight] [--url=<url>] [--fields=<fields>] [--format=<format>]
wp profile stage [<stage>] [--all] [--spotlight] [--url=<url>] [--fields=<fields>] [--format=<format>] [--order=<order>] [--orderby=<orderby>]
~~~
When WordPress handles a request from a browser, its essentially
@ -96,6 +96,18 @@ $ wp profile stage bootstrap --fields=hook,time,cache_ratio --spotlight
- csv
---
[--order=<order>]
Ascending or Descending order.
---
default: ASC
options:
- ASC
- DESC
---
[--orderby=<orderby>]
Order by fields.
### wp profile hook
@ -103,7 +115,7 @@ $ wp profile stage bootstrap --fields=hook,time,cache_ratio --spotlight
Profile key metrics for WordPress hooks (actions and filters).
~~~
wp profile hook [<hook>] [--all] [--spotlight] [--url=<url>] [--fields=<fields>] [--format=<format>]
wp profile hook [<hook>] [--all] [--spotlight] [--url=<url>] [--fields=<fields>] [--format=<format>] [--order=<order>] [--orderby=<orderby>]
~~~
In order to profile callbacks on a specific hook, the action or filter
@ -137,6 +149,18 @@ will need to execute during the course of the request.
- csv
---
[--order=<order>]
Ascending or Descending order.
---
default: ASC
options:
- ASC
- DESC
---
[--orderby=<orderby>]
Order by fields.
### wp profile eval
@ -144,7 +168,7 @@ will need to execute during the course of the request.
Profile arbitrary code execution.
~~~
wp profile eval <php-code> [--hook[=<hook>]] [--fields=<fields>] [--format=<format>]
wp profile eval <php-code> [--hook[=<hook>]] [--fields=<fields>] [--format=<format>] [--order=<order>] [--orderby=<orderby>]
~~~
Code execution happens after WordPress has loaded entirely, which means
@ -173,6 +197,18 @@ current theme.
- csv
---
[--order=<order>]
Ascending or Descending order.
---
default: ASC
options:
- ASC
- DESC
---
[--orderby=<orderby>]
Order by fields.
### wp profile eval-file
@ -180,7 +216,7 @@ current theme.
Profile execution of an arbitrary file.
~~~
wp profile eval-file <file> [--hook[=<hook>]] [--fields=<fields>] [--format=<format>]
wp profile eval-file <file> [--hook[=<hook>]] [--fields=<fields>] [--format=<format>] [--order=<order>] [--orderby=<orderby>]
~~~
File execution happens after WordPress has loaded entirely, which means
@ -209,6 +245,18 @@ current theme.
- csv
---
[--order=<order>]
Ascending or Descending order.
---
default: ASC
options:
- ASC
- DESC
---
[--orderby=<orderby>]
Order by fields.
## Installing
Installing this package requires WP-CLI's latest stable release. Update to the latest stable release with `wp cli update`.

View file

@ -70,6 +70,14 @@ class Command {
*
* [--format=<format>]
* : Render output in a particular format.
* ---
* default: table
* options:
* - table
* - json
* - yaml
* - csv
* ---
*
* [--order=<order>]
* : Ascending or Descending order.
@ -83,15 +91,6 @@ class Command {
* [--orderby=<orderby>]
* : Order by fields.
*
* ---
* default: table
* options:
* - table
* - json
* - yaml
* - csv
* ---
*
* @when before_wp_load
*/
public function stage( $args, $assoc_args ) {
@ -177,6 +176,14 @@ class Command {
*
* [--format=<format>]
* : Render output in a particular format.
* ---
* default: table
* options:
* - table
* - json
* - yaml
* - csv
* ---
*
* [--order=<order>]
* : Ascending or Descending order.
@ -190,14 +197,6 @@ class Command {
* [--orderby=<orderby>]
* : Order by fields.
*
* default: table
* options:
* - table
* - json
* - yaml
* - csv
* ---
*
* @when before_wp_load
*/
public function hook( $args, $assoc_args ) {
@ -261,6 +260,14 @@ class Command {
*
* [--format=<format>]
* : Render output in a particular format.
* ---
* default: table
* options:
* - table
* - json
* - yaml
* - csv
* ---
*
* [--order=<order>]
* : Ascending or Descending order.
@ -274,15 +281,6 @@ class Command {
* [--orderby=<orderby>]
* : Order by fields.
*
* ---
* default: table
* options:
* - table
* - json
* - yaml
* - csv
* ---
*
* @subcommand eval
*/
public function eval_( $args, $assoc_args ) {
@ -316,6 +314,14 @@ class Command {
*
* [--format=<format>]
* : Render output in a particular format.
* ---
* default: table
* options:
* - table
* - json
* - yaml
* - csv
* ---
*
* [--order=<order>]
* : Ascending or Descending order.
@ -329,15 +335,6 @@ class Command {
* [--orderby=<orderby>]
* : Order by fields.
*
* ---
* default: table
* options:
* - table
* - json
* - yaml
* - csv
* ---
*
* @subcommand eval-file
*/
public function eval_file( $args, $assoc_args ) {