Automattic\WP\Cron_Control\Cron_Options_CPT::convert_option PHP Метод

convert_option() приватный Метод

Save cron events in CPT
private convert_option ( $new_value )
    private function convert_option($new_value)
    {
        if (is_array($new_value) && !empty($new_value)) {
            $events = collapse_events_array($new_value);
            foreach ($events as $event) {
                $job_exists = $this->job_exists($event['timestamp'], $event['action'], $event['instance']);
                if (!$job_exists) {
                    $this->create_or_update_job($event['timestamp'], $event['action'], $event['args']);
                }
            }
        }
    }