diff --git a/README.md b/README.md index fd5b5ee..70db57b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ wp-cli/find-command =================== -Find WordPress installs on the filesystem. +Find WordPress installations on the filesystem. [![Build Status](https://travis-ci.org/wp-cli/find-command.svg?branch=master)](https://travis-ci.org/wp-cli/find-command) @@ -14,14 +14,14 @@ wp find [--skip-ignored-paths] [--include_ignored_paths=] [--max_d ~~~ Recursively iterates subdirectories of provided `` to find and -report WordPress installs. A WordPress install is a wp-includes directory -with a version.php file. +report WordPress installations. A WordPress installation is a wp-includes +directory with a version.php file. Avoids recursing some known paths (e.g. /node_modules/, hidden sys dirs) to significantly improve performance. -Indicates depth at which the WordPress install was found, and its alias, -if it has one. +Indicates depth at which the WordPress installations was found, and its +alias, if it has one. ``` $ wp find ./ @@ -99,7 +99,7 @@ Once you've decided to commit the time to seeing your pull request through, [ple ## Support -Github issues aren't for general support questions, but there are other venues you can try: http://wp-cli.org/#support +Github issues aren't for general support questions, but there are other venues you can try: https://wp-cli.org/#support *This README.md is generated dynamically from the project's codebase using `wp scaffold package-readme` ([doc](https://github.com/wp-cli/scaffold-package-command#wp-scaffold-package-readme)). To suggest changes, please submit a pull request against the corresponding part of the codebase.* diff --git a/composer.json b/composer.json index 7f2fd98..7363320 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "wp-cli/find-command", - "description": "Find WordPress installs on the filesystem.", + "description": "Find WordPress installations on the filesystem.", "type": "wp-cli-package", "homepage": "https://github.com/wp-cli/finder-command", "license": "MIT", diff --git a/features/find.feature b/features/find.feature index 17fe453..7b2cb92 100644 --- a/features/find.feature +++ b/features/find.feature @@ -17,11 +17,11 @@ Feature: Find WordPress installs on the filesystem When I run `wp find {TEST_DIR} --field=version_path --verbose` Then STDOUT should contain: """ - Found WordPress install at '{TEST_DIR}/subdir1/wp-includes/version.php' + Found WordPress installation at '{TEST_DIR}/subdir1/wp-includes/version.php' """ And STDOUT should contain: """ - Found WordPress install at '{TEST_DIR}/subdir2/wp-includes/version.php' + Found WordPress installation at '{TEST_DIR}/subdir2/wp-includes/version.php' """ When I run `wp find {TEST_DIR} --format=count` @@ -41,11 +41,11 @@ Feature: Find WordPress installs on the filesystem When I run `wp find {TEST_DIR} --field=version_path --verbose` Then STDOUT should contain: """ - Found WordPress install at '{TEST_DIR}/subdir1/wp-includes/version.php' + Found WordPress installation at '{TEST_DIR}/subdir1/wp-includes/version.php' """ And STDOUT should not contain: """ - Found WordPress install at '{TEST_DIR}/subdir2/wp-includes/version.php' + Found WordPress installation at '{TEST_DIR}/subdir2/wp-includes/version.php' """ And STDOUT should contain: """ @@ -80,15 +80,15 @@ Feature: Find WordPress installs on the filesystem When I run `wp find {TEST_DIR} --verbose` Then STDOUT should contain: """ - Found WordPress install at '{TEST_DIR}/subdir1/wp-includes/version.php' + Found WordPress installation at '{TEST_DIR}/subdir1/wp-includes/version.php' """ And STDOUT should contain: """ - Found WordPress install at '{TEST_DIR}/sub/subdir2/wp-includes/version.php' + Found WordPress installation at '{TEST_DIR}/sub/subdir2/wp-includes/version.php' """ And STDOUT should contain: """ - Found WordPress install at '{TEST_DIR}/sub/sub/subdir3/wp-includes/version.php' + Found WordPress installation at '{TEST_DIR}/sub/sub/subdir3/wp-includes/version.php' """ When I run `wp find {TEST_DIR} --format=count` @@ -100,11 +100,11 @@ Feature: Find WordPress installs on the filesystem When I run `wp find {TEST_DIR} --verbose --max_depth=2` Then STDOUT should contain: """ - Found WordPress install at '{TEST_DIR}/subdir1/wp-includes/version.php' + Found WordPress installation at '{TEST_DIR}/subdir1/wp-includes/version.php' """ And STDOUT should contain: """ - Found WordPress install at '{TEST_DIR}/sub/subdir2/wp-includes/version.php' + Found WordPress installation at '{TEST_DIR}/sub/subdir2/wp-includes/version.php' """ And STDOUT should contain: """ @@ -120,7 +120,7 @@ Feature: Find WordPress installs on the filesystem When I run `wp find {TEST_DIR} --verbose --max_depth=1` Then STDOUT should contain: """ - Found WordPress install at '{TEST_DIR}/subdir1/wp-includes/version.php' + Found WordPress installation at '{TEST_DIR}/subdir1/wp-includes/version.php' """ And STDOUT should contain: """ diff --git a/src/Find_Command.php b/src/Find_Command.php index 12d031f..780feb3 100644 --- a/src/Find_Command.php +++ b/src/Find_Command.php @@ -105,24 +105,24 @@ class Find_Command { private $resolved_aliases = array(); /** - * Found WordPress installs. + * Found WordPress installations. * * @var array */ private $found_wp = array(); /** - * Find WordPress installs on the filesystem. + * Find WordPress installations on the filesystem. * * Recursively iterates subdirectories of provided `` to find and - * report WordPress installs. A WordPress install is a wp-includes directory - * with a version.php file. + * report WordPress installations. A WordPress installation is a wp-includes + * directory with a version.php file. * * Avoids recursing some known paths (e.g. /node_modules/, hidden sys dirs) * to significantly improve performance. * - * Indicates depth at which the WordPress install was found, and its alias, - * if it has one. + * Indicates depth at which the WordPress installations was found, and its + * alias, if it has one. * * ``` * $ wp find ./ @@ -192,9 +192,9 @@ public function __invoke( $args, $assoc_args ) { } $this->start_time = microtime( true ); - $this->log( "Searching for WordPress installs in '{$path}'" ); + $this->log( "Searching for WordPress installations in '{$path}'" ); $this->recurse_directory( $this->base_path ); - $this->log( "Finished search for WordPress installs in '{$path}'" ); + $this->log( "Finished search for WordPress installations in '{$path}'" ); $formatter = new \WP_CLI\Formatter( $assoc_args, array( 'version_path', 'version', 'depth', 'alias' ) ); $formatter->display_items( $this->found_wp ); } @@ -209,7 +209,7 @@ private function recurse_directory( $path ) { // Provide consistent trailing slashes to all paths $path = rtrim( $path, '/' ) . '/'; - // Don't recurse directories that probably don't have a WordPress install. + // Don't recurse directories that probably don't have a WordPress installation. if ( ! $this->skip_ignored_paths ) { // Assume base path doesn't need comparison $compared_path = preg_replace( '#^' . preg_quote( $this->base_path ) . '#', '', $path ); @@ -242,7 +242,7 @@ private function recurse_directory( $path ) { 'depth' => $this->current_depth - 1, 'alias' => $alias, ); - $this->log( "Found WordPress install at '{$version_path}'" ); + $this->log( "Found WordPress installation at '{$version_path}'" ); return; } @@ -271,7 +271,7 @@ private function recurse_directory( $path ) { } /** - * Get the WordPress version for the install, without executing the file. + * Get the WordPress version for the installation, without executing the file. */ private static function get_wp_version( $path ) { $contents = file_get_contents( $path );