Beispiel #1
0
                wp_clear_scheduled_hook('wysija_cron_queue');
                WYSIJA::set_cron_schedule('queue');
                $ms_wysija_sending_cron[$blog_id] = 1;
                update_site_option('ms_wysija_sending_cron', $ms_wysija_sending_cron);
            }
        }
        //simply schedule the queue
        if (!wp_next_scheduled('wysija_cron_queue')) {
            //in the case of multisite and the network's method we schedule with a different frequency
            if ($is_multisite && $modelConf->getValue('sending_method') == 'network') {
                $sending_emails_each = $modelConf->getValue('ms_sending_emails_each');
            } else {
                $sending_emails_each = $modelConf->getValue('sending_emails_each');
            }
            wp_schedule_event($modelConf->getValue('last_save'), $sending_emails_each, 'wysija_cron_queue');
        }
    }
}
//not yet used but the purpose is to override any notification sent through wp_mail
if ($modelConf->getValue('wp_notifications')) {
    $hWPnotif =& WYSIJA::get('wp_notifications', 'helper');
}
//check that there is no late cron schedules if we are using wysija's cron option and that the cron option is triggerred by any page view
if ($modelConf->getValue('cron_manual') && !isset($_REQUEST['process'])) {
    WYSIJA::cron_check();
}
register_deactivation_hook(WYSIJA_FILE, array('WYSIJA', 'deactivate'));
register_activation_hook(WYSIJA_FILE, array('WYSIJA', 'activate'));
add_action('init', array('WYSIJA', 'create_post_type'));
//launch application
$helper =& WYSIJA::get(WYSIJA_SIDE, 'helper');