1236function_set_cron_array($cron,$wp_error=false){1237if(!is_array($cron)){1238$cron=array();1239}12401241$cron['version']=2;12421243$result=update_option('cron',$cron,true);12441245if($wp_error&&!$result){1246returnnewWP_Error(1247'could_not_set',1248__('The cron event list could not be saved.')1249);1250}12511252return$result;1253}
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 6.7.7 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.