New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add `media sizes` command, to list registered media sizes #36

Merged
merged 3 commits into from Aug 24, 2017

Conversation

2 participants
@danielbachhuber
Member

danielbachhuber commented Aug 23, 2017

@danielbachhuber danielbachhuber added this to the 1.0.5 milestone Aug 23, 2017

@danielbachhuber danielbachhuber requested a review from wp-cli/committers Aug 23, 2017

@gitlost

Very useful command.

* ## OPTIONS
*
* [--fields=<fields>]
* : Limit the output to specific fields. Defaults to all fields.

This comment has been minimized.

@gitlost

gitlost Aug 23, 2017

Contributor

Although it becomes clear as soon as you run it, it'd be nice to have a list of the fields here.

@gitlost

gitlost Aug 23, 2017

Contributor

Although it becomes clear as soon as you run it, it'd be nice to have a list of the fields here.

This comment has been minimized.

@danielbachhuber
@danielbachhuber

danielbachhuber Aug 24, 2017

Member
'crop' => 'true',
),
);
foreach( $_wp_additional_image_sizes as $size => $size_args ) {

This comment has been minimized.

@gitlost

gitlost Aug 23, 2017

Contributor

I suppose for WPCS, there should be a space after the foreach.

@gitlost

gitlost Aug 23, 2017

Contributor

I suppose for WPCS, there should be a space after the foreach.

This comment has been minimized.

@danielbachhuber

danielbachhuber Aug 24, 2017

Member

I'd rather not deal with minor coding standards issues until we have wp-cli/scaffold-package-command#70 in place

@danielbachhuber

danielbachhuber Aug 24, 2017

Member

I'd rather not deal with minor coding standards issues until we have wp-cli/scaffold-package-command#70 in place

This comment has been minimized.

@gitlost

gitlost Aug 24, 2017

Contributor

Okay, but if new stuff conforms, it'll be less churn.

@gitlost

gitlost Aug 24, 2017

Contributor

Okay, but if new stuff conforms, it'll be less churn.

'crop' => $size_args['crop'] ? 'true' : 'false',
);
}
usort( $sizes, function( $a, $b ){

This comment has been minimized.

@gitlost

gitlost Aug 23, 2017

Contributor

Also for WPCS, the opening { of the function should be preceded by a space and the closing } followed by one.

@gitlost

gitlost Aug 23, 2017

Contributor

Also for WPCS, the opening { of the function should be preceded by a space and the closing } followed by one.

@gitlost gitlost merged commit 45a924f into master Aug 24, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gitlost gitlost deleted the media-sizes branch Aug 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment