Skip to content

Add a simple progress indicator to wp media regenerate#3407

Merged
danielbachhuber merged 3 commits into
wp-cli:masterfrom
nyordanov:media-regenerate-progress
Sep 23, 2016
Merged

Add a simple progress indicator to wp media regenerate#3407
danielbachhuber merged 3 commits into
wp-cli:masterfrom
nyordanov:media-regenerate-progress

Conversation

@nyordanov
Copy link
Copy Markdown
Contributor

Adds a $current/$count prefix to wp media regenerate's progress logs.

Comment thread php/commands/media.php

if ( empty( $metadata ) ) {
WP_CLI::warning( "Couldn't regenerate thumbnails for $att_desc." );
WP_CLI::warning( "$progress Couldn't regenerate thumbnails for $att_desc." );
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does $progress ever remain empty?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... because, if it does, then we'd end up with an empty space before "Couldn't"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the default argument value in 01bebd9, so I should never be empty now.

@danielbachhuber
Copy link
Copy Markdown
Member

@nyordanov Looks good, just one question.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants