本文整理匯總了PHP中WYSIJA::cron_check方法的典型用法代碼示例。如果您正苦於以下問題:PHP WYSIJA::cron_check方法的具體用法?PHP WYSIJA::cron_check怎麽用?PHP WYSIJA::cron_check使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WYSIJA
的用法示例。
在下文中一共展示了WYSIJA::cron_check方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: wp_clear_scheduled_hook
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');