_get_cron_array(): array[]

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Retrieves cron info array option.

Return

array[] Array of cron events.

Source

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;
}

Changelog

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

User Contributed Notes

You must log in before being able to contribute a note or feedback.