_get_cron_array()
Retrieves cron info array option.
Internal function — this function is designed to be used by the kernel itself. It is 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() get cron array code WP 6.6.2
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; }