protected static function get_cron_events() {

		$crons  = _get_cron_array();
		$events = array();

		if ( empty( $crons ) ) {
			return new WP_Error(
				'no_events',
				'You currently have no scheduled cron events.'
			);
		}

		foreach ( $crons as $time => $hooks ) {
			foreach ( $hooks as $hook => $hook_events ) {
				foreach ( $hook_events as $sig => $data ) {

					$events[] = (object) array(
						'hook'     => $hook,
						'time'     => $time,
						'sig'      => $sig,
						'args'     => $data['args'],
						'schedule' => $data['schedule'],
						'interval' => Utils\get_flag_value( $data, 'interval' ),
					);

				}
			}
		}

		$events = array_map( 'Cron_Event_Command::format_event', $events );

		return $events;

	}
protected static function get_cron_events() {

		$crons  = _get_cron_array();
		$events = array();

		if ( empty( $crons ) ) {
			return new WP_Error(
				'no_events',
				'You currently have no scheduled cron events.'
			);
		}

		foreach ( $crons as $time => $hooks ) {
			foreach ( $hooks as $hook => $hook_events ) {
				foreach ( $hook_events as $sig => $data ) {

					$events[] = (object) array(
						'hook'     => $hook,
						'time'     => $time,
						'sig'      => $sig,
						'args'     => $data['args'],
						'schedule' => $data['schedule'],
						'interval' => Utils\get_flag_value( $data, 'interval' ),
					);

				}
			}
		}

		$events = array_map( 'Cron_Event_Command::format_event', $events );

		return $events;

	}
protected static function get_cron_events ( ) { $ crons = _get_cron_array ( ) ; $ events = array ( ) ; if ( empty ( $ crons ) ) { return new WP_Error ( 'no_events' , 'You currently have no scheduled cron events.' ) ; } foreach ( $ crons as $ time => $ hooks ) { foreach ( $ hooks as $ hook => $ hook_events ) { foreach ( $ hook_events as $ sig => $ data ) { $ events [ ] = ( object ) array ( 'hook' => $ hook , 'time' => $ time , 'sig' => $ sig , 'args' => $ data [ 'args' ] , 'schedule' => $ data [ 'schedule' ] , 'interval' => Utils \ get_flag_value ( $ data , 'interval' ) , ) ; } } } $ events = array_map ( 'Cron_Event_Command::format_event' , $ events ) ; return $ events ; }
Fetches an array of scheduled cron events.

@return array|WP_Error An array of event objects, or a WP_Error object if there are no events scheduled.
Fetches an array of scheduled cron events .