diff --git a/README.md b/README.md index 045c04f..f351c6c 100644 --- a/README.md +++ b/README.md @@ -23,31 +23,6 @@ to significantly improve performance. Indicates depth at which the WordPress installations was found, and its alias, if it has one. -``` -$ wp find ./ -+--------------------------------------+---------------------+-------+--------+ -| version_path | version | depth | alias | -+--------------------------------------+---------------------+-------+--------+ -| /Users/wpcli/wp-includes/version.php | 4.8-alpha-39357-src | 2 | @wpcli | -+--------------------------------------+---------------------+-------+--------+ -``` - -**AVAILABLE FIELDS** - -These fields will be displayed by default for each installation: - -* version_path - Path to the version.php file. -* version - WordPress version. -* depth - Directory depth at which the installation was found. -* alias - WP-CLI alias, if one is registered. - -These fields are optionally available: - -* wp_path - Path that can be passed to `--path=` global parameter. -* db_host - Host name for the database. -* db_user - User name for the database. -* db_name - Database name for the database. - **OPTIONS** @@ -83,6 +58,32 @@ These fields are optionally available: [--verbose] Log useful information to STDOUT. +**AVAILABLE FIELDS** + +These fields will be displayed by default for each installation: + +* version_path - Path to the version.php file. +* version - WordPress version. +* depth - Directory depth at which the installation was found. +* alias - WP-CLI alias, if one is registered. + +These fields are optionally available: + +* wp_path - Path that can be passed to `--path=` global parameter. +* db_host - Host name for the database. +* db_user - User name for the database. +* db_name - Database name for the database. + +**EXAMPLES** + + # Find WordPress installations. + $ wp find ./ + +--------------------------------------+---------------------+-------+--------+ + | version_path | version | depth | alias | + +--------------------------------------+---------------------+-------+--------+ + | /Users/wpcli/wp-includes/version.php | 4.8-alpha-39357-src | 2 | @wpcli | + +--------------------------------------+---------------------+-------+--------+ + ## Installing Installing this package requires WP-CLI v2 or greater. Update to the latest stable release with `wp cli update`. diff --git a/src/Find_Command.php b/src/Find_Command.php index dfb2871..4498397 100644 --- a/src/Find_Command.php +++ b/src/Find_Command.php @@ -125,31 +125,6 @@ class Find_Command { * Indicates depth at which the WordPress installations was found, and its * alias, if it has one. * - * ``` - * $ wp find ./ - * +--------------------------------------+---------------------+-------+--------+ - * | version_path | version | depth | alias | - * +--------------------------------------+---------------------+-------+--------+ - * | /Users/wpcli/wp-includes/version.php | 4.8-alpha-39357-src | 2 | @wpcli | - * +--------------------------------------+---------------------+-------+--------+ - * ``` - * - * ## AVAILABLE FIELDS - * - * These fields will be displayed by default for each installation: - * - * * version_path - Path to the version.php file. - * * version - WordPress version. - * * depth - Directory depth at which the installation was found. - * * alias - WP-CLI alias, if one is registered. - * - * These fields are optionally available: - * - * * wp_path - Path that can be passed to `--path=` global parameter. - * * db_host - Host name for the database. - * * db_user - User name for the database. - * * db_name - Database name for the database. - * * ## OPTIONS * * @@ -185,6 +160,32 @@ class Find_Command { * [--verbose] * : Log useful information to STDOUT. * + * ## AVAILABLE FIELDS + * + * These fields will be displayed by default for each installation: + * + * * version_path - Path to the version.php file. + * * version - WordPress version. + * * depth - Directory depth at which the installation was found. + * * alias - WP-CLI alias, if one is registered. + * + * These fields are optionally available: + * + * * wp_path - Path that can be passed to `--path=` global parameter. + * * db_host - Host name for the database. + * * db_user - User name for the database. + * * db_name - Database name for the database. + * + * ## EXAMPLES + * + * # Find WordPress installations. + * $ wp find ./ + * +--------------------------------------+---------------------+-------+--------+ + * | version_path | version | depth | alias | + * +--------------------------------------+---------------------+-------+--------+ + * | /Users/wpcli/wp-includes/version.php | 4.8-alpha-39357-src | 2 | @wpcli | + * +--------------------------------------+---------------------+-------+--------+ + * * @when before_wp_load */ public function __invoke( $args, $assoc_args ) {