Commit ddee65e3 authored by Erick Hitter's avatar Erick Hitter Committed by GitHub
Browse files

Merge pull request #51 from Automattic/28/add-internal-job-column

In CLI output, indicate if job is an Internal Event
parents 8a2d79bd 50ebb6cf
......@@ -56,6 +56,7 @@ class Events extends \WP_CLI_Command {
'next_run_relative',
'last_updated_gmt',
'recurrence',
'internal_event',
'schedule_name',
'event_args',
) );
......@@ -135,6 +136,7 @@ class Events extends \WP_CLI_Command {
'next_run_relative' => $this->calculate_interval( strtotime( $event->post_date_gmt ) - time() ),
'last_updated_gmt' => date( TIME_FORMAT, strtotime( $event->post_modified_gmt ) ),
'recurrence' => __( 'Non-repeating', 'automattic-cron-control' ),
'internal_event' => '',
'schedule_name' => __( 'n/a', 'automattic-cron-control' ),
'event_args' => '',
);
......@@ -144,7 +146,8 @@ class Events extends \WP_CLI_Command {
if ( is_array( $all_args ) ) {
// Action
if ( isset( $all_args['action'] ) ) {
$row['action'] = $all_args['action'];
$row['action'] = $all_args['action'];
$row['internal_event'] = \Automattic\WP\Cron_Control\is_internal_event( $all_args['action'] ) ? __( 'true', 'automattic-cron-control' ) : '';
}
// Instance
......
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