> */ public function get_events() { $cron_events = _get_cron_array(); if ( ! is_array( $cron_events ) ) { return array(); } $events = array(); foreach ( $cron_events as $timestamp => $hooks ) { if ( ! is_array( $hooks ) ) { continue; } foreach ( $hooks as $hook => $schedules ) { if ( ! is_array( $schedules ) ) { continue; } foreach ( $schedules as $schedule ) { $recurrence = isset( $schedule['schedule'] ) ? $schedule['schedule'] : __( 'Once', 'taskbeacon' ); $events[] = array( 'hook' => sanitize_key( $hook ), 'next_run' => wp_date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), (int) $timestamp ), 'recurrence' => sanitize_text_field( $recurrence ), ); } } } return $events; } }