Skip to content

Commit

Permalink
Merge pull request #2 from gilbitron/patch-1
Browse files Browse the repository at this point in the history
Update command to "unsplash"
  • Loading branch information
A5hleyRich committed Feb 9, 2016
2 parents d4f8c86 + ef14016 commit 015c6cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ Download and import images from [Unsplash](https://unsplash.com) into your Media

Basic usage, which will import 10 images:

`wp media generate`
`wp unsplash`

#### `count=<number>`

Import 100 images:

`wp media generate --count=100`
`wp unsplash --count=100`

#### `media_date=<yyyy-mm-dd|random>`

Import images with a specific attachment date:

`wp media generate --media_date=2016-01-25`
`wp unsplash --media_date=2016-01-25`

Import images with random attachment dates:

`wp media generate --media_date=random`
`wp unsplash --media_date=random`

#### `media_dimensions=<dimensions>`

Import images with specific dimensions:

`wp media generate --media_dimensions=1080x720`
`wp unsplash --media_dimensions=1080x720`
8 changes: 4 additions & 4 deletions class-wp-cli-unsplash-command.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class WP_CLI_Unsplash_Command extends WP_CLI_Command {
*
* ## EXAMPLES
*
* wp media generate --count=10
* wp media generate --media_date=random
* wp media generate --media_dimensions=1080x720
* wp unsplash --count=10
* wp unsplash --media_date=random
* wp unsplash --media_dimensions=1080x720
*/
public function __invoke( $args, $assoc_args = array() ) {
$defaults = array(
Expand Down Expand Up @@ -125,4 +125,4 @@ private function _process_downloaded_image( $tmp_file, $media_author, $media_dat
}
}

WP_CLI::add_command( 'unsplash', 'WP_CLI_Unsplash_Command' );
WP_CLI::add_command( 'unsplash', 'WP_CLI_Unsplash_Command' );

0 comments on commit 015c6cf

Please sign in to comment.