_get_cron_array()WP 2.1.0

Retrieve cron info array option.

This is an internal function for using it by WP core itself. It's not recommended to use this function in your code.

No Hooks.

Return

Array[]. Array of cron events.

Usage

_get_cron_array();

Changelog

Since 2.1.0 Introduced.
Since 6.1.0 Return type modified to consistently return an array.

_get_cron_array() code WP 6.1.1

function _get_cron_array() {
	$cron = get_option( 'cron' );
	if ( ! is_array( $cron ) ) {
		return array();
	}

	if ( ! isset( $cron['version'] ) ) {
		$cron = _upgrade_cron_array( $cron );
	}

	unset( $cron['version'] );

	return $cron;
}