\WP_CLI::line(sprintf(_n('Displaying one entry','Displaying all %s entries',$total_events_to_display,'automattic-cron-control'),number_format_i18n($total_events_to_display)));
\WP_CLI::log(sprintf(_n('Displaying one entry','Displaying all %s entries',$total_events_to_display,'automattic-cron-control'),number_format_i18n($total_events_to_display)));
}else{
\WP_CLI::line(sprintf(__('Displaying %1$s of %2$s entries, page %3$s of %4$s','automattic-cron-control'),number_format_i18n($total_events_to_display),number_format_i18n($events['total_items']),number_format_i18n($events['page']),number_format_i18n($events['total_pages'])));
\WP_CLI::log(sprintf(__('Displaying %1$s of %2$s entries, page %3$s of %4$s','automattic-cron-control'),number_format_i18n($total_events_to_display),number_format_i18n($events['total_items']),number_format_i18n($events['page']),number_format_i18n($events['total_pages'])));
}
// And reformat
...
...
@@ -117,7 +117,7 @@ class Events extends \WP_CLI_Command {
\WP_CLI::error(sprintf(__('Failed to locate event %d. Please confirm that the entry exists and that the ID is that of an event.','automattic-cron-control'),$args[0]));
}
\WP_CLI::line(sprintf(__('Found event %1$d with action `%2$s` and instance identifier `%3$s`','automattic-cron-control'),$args[0],$event->action,$event->instance));
\WP_CLI::log(sprintf(__('Found event %1$d with action `%2$s` and instance identifier `%3$s`','automattic-cron-control'),$args[0],$event->action,$event->instance));
// Proceed?
$now=time();
...
...
@@ -358,7 +358,7 @@ class Events extends \WP_CLI_Command {
\WP_CLI::line(sprintf(_n('Found one event to check','Found %s events to check',$events['total_items'],'automattic-cron-control'),number_format_i18n($events['total_items'])));
\WP_CLI::log(sprintf(_n('Found one event to check','Found %s events to check',$events['total_items'],'automattic-cron-control'),number_format_i18n($events['total_items'])));
$search_progress=\WP_CLI\Utils\make_progress_bar(sprintf(__('Searching events for those with the action `%s`','automattic-cron-control'),$action),$events['total_items']);
...
...
@@ -450,7 +450,7 @@ class Events extends \WP_CLI_Command {
$search_progress->finish();
\WP_CLI::line('');
\WP_CLI::log('');
// Nothing more to do
if(empty($events_to_delete)){
...
...
@@ -460,7 +460,7 @@ class Events extends \WP_CLI_Command {
// List the items to remove
$total_to_delete=count($events_to_delete);
\WP_CLI::line(sprintf(_n('Found one event with action `%2$s`:','Found %1$s events with action `%2$s`:',$total_to_delete,'automattic-cron-control'),number_format_i18n($total_to_delete),$action));
\WP_CLI::log(sprintf(_n('Found one event with action `%2$s`:','Found %1$s events with action `%2$s`:',$total_to_delete,'automattic-cron-control'),number_format_i18n($total_to_delete),$action));
if($total_to_delete<=$assoc_args['limit']){
// Sort results
...
...
@@ -480,7 +480,7 @@ class Events extends \WP_CLI_Command {
\WP_CLI::warning(sprintf(__('Events are not displayed as there are more than %s to remove','automattic-cron-control'),number_format_i18n($assoc_args['limit'])));
}
\WP_CLI::line('');
\WP_CLI::log('');
\WP_CLI::confirm(_n('Are you sure you want to delete this event?','Are you sure you want to delete these events?',$total_to_delete,'automattic-cron-control'));
// Remove the items
...
...
@@ -520,7 +520,7 @@ class Events extends \WP_CLI_Command {
\WP_CLI::line(sprintf(_n('Displaying one event','Displaying %s events',$total_events_to_display,'automattic-cron-control'),number_format_i18n($total_events_to_display)));
\WP_CLI::log(sprintf(_n('Displaying one event','Displaying %s events',$total_events_to_display,'automattic-cron-control'),number_format_i18n($total_events_to_display)));