print_license_details(); $this->print_schedule_jobs(); } // phpcs:enable /** * Print License details. */ protected function print_license_details() { $keys = \BD_License::get_licenses(); if ( ! empty( $keys ) ) { echo 'BULKWP-LICENSE: ', "\n"; foreach ( $keys as $key ) { echo $key['addon-name']; echo ' | '; echo $key['license']; echo ' | '; echo $key['expires']; echo ' | '; echo $key['validity']; echo ' | '; echo $key['addon-code']; } } } /** * Print all schedule jobs. */ protected function print_schedule_jobs() { $cron = _get_cron_array(); if ( ! empty( $cron ) ) { echo "\n", 'SCHEDULED JOBS: ', "\n"; $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 ) ) { 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; echo "\n"; } } } } echo "\n"; } } }