Commit cc62c066 authored by Erick Hitter's avatar Erick Hitter
Browse files

Include human-friendly indication of how long automatic execution is disabled

A timestamp by itself, particularly if far into the future or if one doesn't have regular access to UTC, is not particularly helpful.

Fixes #137
parent 77c2e840
......@@ -24,7 +24,7 @@ class Orchestrate extends \WP_CLI_Command {
break;
default :
$status = sprintf( __( 'Automatic execution is disabled until %s', 'automattic-cron-control' ), date_i18n( 'Y-m-d H:i:s T', $status ) );
$status = sprintf( __( 'Automatic execution is disabled for %1$s (until %2$s)', 'automattic-cron-control' ), human_time_diff( $status ), date_i18n( 'Y-m-d H:i:s T', $status ) );
break;
}
......@@ -67,7 +67,7 @@ class Orchestrate extends \WP_CLI_Command {
$updated = \Automattic\WP\Cron_Control\Events::instance()->update_run_status( $disable_ts );
if ( $updated ) {
\WP_CLI::success( sprintf( __( 'Disabled until %s', 'automattic-cron-control' ), date_i18n( 'Y-m-d H:i:s T', $disable_ts ) ) );
\WP_CLI::success( sprintf( __( 'Disabled for %1$s (until %2$s)', 'automattic-cron-control' ), human_time_diff( $disable_ts ), date_i18n( 'Y-m-d H:i:s T', $disable_ts ) ) );
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment