diff --git a/include/helpers/common.php b/include/helpers/common.php index cd753ae8c..f64b39665 100644 --- a/include/helpers/common.php +++ b/include/helpers/common.php @@ -177,3 +177,32 @@ function bd_print_network_active_plugins() { echo $plugin['Name'] . ' :' . $plugin['Version'] . "\n"; } } + +/** + * Print scheduled jobs. + * + * @since 6.0 + */ +function bd_print_scheduled_jobs() { + $cron = _get_cron_array(); + $date_format = _x( 'M j, Y @ G:i', 'Cron table date format', 'bulk-delete' ); + + foreach ( $cron as $timestamp => $cronhooks ) { + foreach ( (array) $cronhooks as $hook => $events ) { + if ( 'do-bulk-delete-' === substr( $hook, 0, 15 ) ) { + $cron_item = array(); + + foreach ( (array) $events as $key => $event ) { + echo date_i18n( $date_format, $timestamp + ( get_option( 'gmt_offset' ) * 60 * 60 ) ). ' ('. $timestamp. ')'; + echo " | "; + echo $event['schedule']; + echo " | "; + echo $hook; + // print_r( $event['args'] ); + echo "\n"; + } + + } + } + } +} diff --git a/include/system-info/class-bd-system-info-page.php b/include/system-info/class-bd-system-info-page.php index 8651f37de..e15bb25c3 100644 --- a/include/system-info/class-bd-system-info-page.php +++ b/include/system-info/class-bd-system-info-page.php @@ -189,6 +189,10 @@ protected function render_body() { +SCHEDULED JOBS: + + + NETWORK ACTIVE PLUGINS: