pre_get_ready_cron_jobs
Filter to override retrieving ready cron jobs.
Returning an array will short-circuit the normal retrieval of ready cron jobs, causing the function to return the filtered value instead.
Usage
add_filter( 'pre_get_ready_cron_jobs', 'wp_kama_pre_get_ready_cron_jobs_filter' );
/**
* Function for `pre_get_ready_cron_jobs` filter-hook.
*
* @param null|array[] $pre Array of ready cron tasks to return instead.
*
* @return null|array[]
*/
function wp_kama_pre_get_ready_cron_jobs_filter( $pre ){
// filter...
return $pre;
}
- $pre(null|array[])
- Array of ready cron tasks to return instead.
Default: null to continue using results from _get_cron_array()
Changelog
| Since 5.1.0 | Introduced. |
Where the hook is called
pre_get_ready_cron_jobs
wp-includes/cron.php 1197
$pre = apply_filters( 'pre_get_ready_cron_jobs', null );