1287function_set_cron_array($cron,$wp_error=false){1288if(!is_array($cron)){1289$cron=array();1290}12911292$cron['version']=2;12931294$result=update_option('cron',$cron,true);12951296if($wp_error&&!$result){1297returnnewWP_Error(1298'could_not_set',1299__('The cron event list could not be saved.')1300);1301}13021303return$result;1304}
History
Introduced in 2.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
5.7.0
The $wp_error parameter was added.from the docblock
5.1.0
Return value modified to outcome of update_option().from the docblock
2.1.0
Introduced.from the docblock
About this page
Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-includes/cron.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.