Skip to content
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

Refactored aspects of the image collection and determination of sizes #103

Merged
merged 4 commits into from Apr 21, 2019

Conversation

@jcomack
Copy link
Contributor

commented Apr 7, 2019

This PR introduces some refactoring of the Media_Command.php file, which in part removes some of the hard-coded arrays that were being used in some of the commands and makes it fully dynamic based on data that is present within WordPress itself (as discussed with @schlessera during WordCamp London 2019 ).

Additionally, there is some prep work being done to advance the further implementation of wp-cli/ideas#32 by moving out the WP_Query code into its own function for further reuse.

No tests have been added as nothing has been changed in terms of output.

@jcomack jcomack requested a review from wp-cli/committers as a code owner Apr 7, 2019

@danielbachhuber
Copy link
Member

left a comment

Thanks for the pull request, @jcomack!

Can you include some additional tests in feature/media-image-size.feature to ensure that all expected media sizes are present?

schlessera added some commits Apr 21, 2019

Merge branch 'master' into refactor-image-size-collection
Also, adapt CS to fit new rules.

@schlessera schlessera added this to the 2.0.3 milestone Apr 21, 2019

Tests were added to make sure the output didn't change

@schlessera schlessera merged commit 68e2402 into wp-cli:master Apr 21, 2019

1 check passed

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

@jcomack jcomack deleted the jcomack:refactor-image-size-collection branch Jun 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.