Skip to content

Commit

Permalink
Add a usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber committed Apr 27, 2018
1 parent 58f11d2 commit 906dc61
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@ Downloads and forcefully reinstalls WordPress core, themes, and plugins,
all at their current versions. Skips themes and plugins not available on
WordPress.org.

**EXAMPLES**

# Reinstalls core, Aksimet, and Twenty Sixteen
$ wp reinstall
Downloading WordPress 4.7.10 (en_US)...
md5 hash verified: 57813ca592cd9a1eff210627ade9f350
Success: WordPress downloaded.
Installing Akismet Anti-Spam (3.3.2)
Plugin updated successfully.
Success: Installed 1 of 1 plugins.
Skipped hello plugin.
Installing Twenty Sixteen (1.3)
Theme updated successfully.
Success: Installed 1 of 1 themes.
Success: Reinstall complete.

## Installing

Installing this package requires WP-CLI v1.1.0 or greater. Update to the latest stable release with `wp cli update`.
Expand Down
16 changes: 16 additions & 0 deletions src/Reinstall_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@ class Reinstall_Command {
* Downloads and forcefully reinstalls WordPress core, themes, and plugins,
* all at their current versions. Skips themes and plugins not available on
* WordPress.org.
*
* ## EXAMPLES
*
* # Reinstalls core, Aksimet, and Twenty Sixteen
* $ wp reinstall
* Downloading WordPress 4.7.10 (en_US)...
* md5 hash verified: 57813ca592cd9a1eff210627ade9f350
* Success: WordPress downloaded.
* Installing Akismet Anti-Spam (3.3.2)
* Plugin updated successfully.
* Success: Installed 1 of 1 plugins.
* Skipped hello plugin.
* Installing Twenty Sixteen (1.3)
* Theme updated successfully.
* Success: Installed 1 of 1 themes.
* Success: Reinstall complete.
*/
public function __invoke() {
$core_version = WP_CLI::runcommand( 'core version', array( 'return' => true ) );
Expand Down

0 comments on commit 906dc61

Please sign in to comment.