Skip to content

Commit 48a7635

Browse files
authored
Update find command docs (#73)
1 parent 564c2c2 commit 48a7635

File tree

2 files changed

+52
-50
lines changed

2 files changed

+52
-50
lines changed

README.md

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,6 @@ to significantly improve performance.
2323
Indicates depth at which the WordPress installations was found, and its
2424
alias, if it has one.
2525

26-
```
27-
$ wp find ./
28-
+--------------------------------------+---------------------+-------+--------+
29-
| version_path | version | depth | alias |
30-
+--------------------------------------+---------------------+-------+--------+
31-
| /Users/wpcli/wp-includes/version.php | 4.8-alpha-39357-src | 2 | @wpcli |
32-
+--------------------------------------+---------------------+-------+--------+
33-
```
34-
35-
**AVAILABLE FIELDS**
36-
37-
These fields will be displayed by default for each installation:
38-
39-
* version_path - Path to the version.php file.
40-
* version - WordPress version.
41-
* depth - Directory depth at which the installation was found.
42-
* alias - WP-CLI alias, if one is registered.
43-
44-
These fields are optionally available:
45-
46-
* wp_path - Path that can be passed to `--path=<path>` global parameter.
47-
* db_host - Host name for the database.
48-
* db_user - User name for the database.
49-
* db_name - Database name for the database.
50-
5126
**OPTIONS**
5227

5328
<path>
@@ -83,6 +58,32 @@ These fields are optionally available:
8358
[--verbose]
8459
Log useful information to STDOUT.
8560

61+
**AVAILABLE FIELDS**
62+
63+
These fields will be displayed by default for each installation:
64+
65+
* version_path - Path to the version.php file.
66+
* version - WordPress version.
67+
* depth - Directory depth at which the installation was found.
68+
* alias - WP-CLI alias, if one is registered.
69+
70+
These fields are optionally available:
71+
72+
* wp_path - Path that can be passed to `--path=<path>` global parameter.
73+
* db_host - Host name for the database.
74+
* db_user - User name for the database.
75+
* db_name - Database name for the database.
76+
77+
**EXAMPLES**
78+
79+
# Find WordPress installations.
80+
$ wp find ./
81+
+--------------------------------------+---------------------+-------+--------+
82+
| version_path | version | depth | alias |
83+
+--------------------------------------+---------------------+-------+--------+
84+
| /Users/wpcli/wp-includes/version.php | 4.8-alpha-39357-src | 2 | @wpcli |
85+
+--------------------------------------+---------------------+-------+--------+
86+
8687
## Installing
8788

8889
Installing this package requires WP-CLI v2 or greater. Update to the latest stable release with `wp cli update`.

src/Find_Command.php

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -125,31 +125,6 @@ class Find_Command {
125125
* Indicates depth at which the WordPress installations was found, and its
126126
* alias, if it has one.
127127
*
128-
* ```
129-
* $ wp find ./
130-
* +--------------------------------------+---------------------+-------+--------+
131-
* | version_path | version | depth | alias |
132-
* +--------------------------------------+---------------------+-------+--------+
133-
* | /Users/wpcli/wp-includes/version.php | 4.8-alpha-39357-src | 2 | @wpcli |
134-
* +--------------------------------------+---------------------+-------+--------+
135-
* ```
136-
*
137-
* ## AVAILABLE FIELDS
138-
*
139-
* These fields will be displayed by default for each installation:
140-
*
141-
* * version_path - Path to the version.php file.
142-
* * version - WordPress version.
143-
* * depth - Directory depth at which the installation was found.
144-
* * alias - WP-CLI alias, if one is registered.
145-
*
146-
* These fields are optionally available:
147-
*
148-
* * wp_path - Path that can be passed to `--path=<path>` global parameter.
149-
* * db_host - Host name for the database.
150-
* * db_user - User name for the database.
151-
* * db_name - Database name for the database.
152-
*
153128
* ## OPTIONS
154129
*
155130
* <path>
@@ -185,6 +160,32 @@ class Find_Command {
185160
* [--verbose]
186161
* : Log useful information to STDOUT.
187162
*
163+
* ## AVAILABLE FIELDS
164+
*
165+
* These fields will be displayed by default for each installation:
166+
*
167+
* * version_path - Path to the version.php file.
168+
* * version - WordPress version.
169+
* * depth - Directory depth at which the installation was found.
170+
* * alias - WP-CLI alias, if one is registered.
171+
*
172+
* These fields are optionally available:
173+
*
174+
* * wp_path - Path that can be passed to `--path=<path>` global parameter.
175+
* * db_host - Host name for the database.
176+
* * db_user - User name for the database.
177+
* * db_name - Database name for the database.
178+
*
179+
* ## EXAMPLES
180+
*
181+
* # Find WordPress installations.
182+
* $ wp find ./
183+
* +--------------------------------------+---------------------+-------+--------+
184+
* | version_path | version | depth | alias |
185+
* +--------------------------------------+---------------------+-------+--------+
186+
* | /Users/wpcli/wp-includes/version.php | 4.8-alpha-39357-src | 2 | @wpcli |
187+
* +--------------------------------------+---------------------+-------+--------+
188+
*
188189
* @when before_wp_load
189190
*/
190191
public function __invoke( $args, $assoc_args ) {

0 commit comments

Comments
 (0)