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

List registered image sizes with hard/soft crop value #49

Merged
merged 2 commits into from Oct 11, 2017

Conversation

2 participants
@diggy
Contributor

diggy commented Oct 11, 2017

Currently, the crop value will always be true, except for the full image size.

+---------------------------+-------+--------+-------+
| name                      | width | height | crop  |
+---------------------------+-------+--------+-------+
| full                      |       |        | false |
| twentyfourteen-full-width | 1038  | 576    | true  |
| large                     | 1024  | 1024   | true  |
| post-thumbnail            | 672   | 372    | true  |
| medium                    | 300   | 300    | true  |
| thumbnail                 | 150   | 150    | true  |
+---------------------------+-------+--------+-------+

This PR adds an additional column indicating if the crop is hard or soft.

+---------------------------+-------+--------+-------+------------+
| name                      | width | height | crop  | hard crop  |
+---------------------------+-------+--------+-------+------------+
| full                      |       |        | false | false      |
| twentyfourteen-full-width | 1038  | 576    | true  | true       |
| large                     | 1024  | 1024   | true  | false      |
| medium_large              | 768   | 0      | true  | false      |
| medium                    | 300   | 300    | true  | false      |
| thumbnail                 | 150   | 150    | true  | true       |
+---------------------------+-------+--------+-------+------------+

Alternatively, the columns could be merged? E.g.:

+---------------------------+-------+--------+-------+
| name                      | width | height | crop  |
+---------------------------+-------+--------+-------+
| full                      |       |        | N/A   |
| twentyfourteen-full-width | 1038  | 576    | hard  |
| large                     | 1024  | 1024   | soft  |
| post-thumbnail            | 672   | 372    | soft  |
| medium                    | 300   | 300    | soft  |
| thumbnail                 | 150   | 150    | hard  |
+---------------------------+-------+--------+-------+
@diggy

This comment has been minimized.

Show comment
Hide comment
@diggy

diggy Oct 11, 2017

Contributor

tests failing on justinrainbow/json-schema

Contributor

diggy commented Oct 11, 2017

tests failing on justinrainbow/json-schema

@danielbachhuber

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber Oct 11, 2017

Member

Alternatively, the columns could be merged? E.g.:

Let's combine them, I think. This is unreleased in a major WP-CLI version, so I'd consider it a bug.

tests failing on justinrainbow/json-schema

Sorry about that. I've cleared Travis cache so your next push won't error.

Member

danielbachhuber commented Oct 11, 2017

Alternatively, the columns could be merged? E.g.:

Let's combine them, I think. This is unreleased in a major WP-CLI version, so I'd consider it a bug.

tests failing on justinrainbow/json-schema

Sorry about that. I've cleared Travis cache so your next push won't error.

@danielbachhuber danielbachhuber merged commit e557468 into wp-cli:master Oct 11, 2017

1 check passed

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

@diggy diggy deleted the diggy:image-sizes-crop branch Oct 13, 2017

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