1256function_set_cron_array($cron,$wp_error=false){1257if(!is_array($cron)){1258$cron=array();1259}12601261$cron['version']=2;12621263$result=update_option('cron',$cron,true);12641265if($wp_error&&!$result){1266returnnewWP_Error(1267'could_not_set',1268__('The cron event list could not be saved.')1269);1270}12711272return$result;1273}
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.8.8 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.