1297function_set_cron_array($cron,$wp_error=false){1298if(!is_array($cron)){1299$cron=array();1300}13011302$cron['version']=2;13031304$result=update_option('cron',$cron,true);13051306if($wp_error&&!$result){1307returnnewWP_Error(1308'could_not_set',1309__('The cron event list could not be saved.')1310);1311}13121313return$result;1314}
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.1.0 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.