本文整理汇总了PHP中WYSIJA::deactivate方法的典型用法代码示例。如果您正苦于以下问题:PHP WYSIJA::deactivate方法的具体用法?PHP WYSIJA::deactivate怎么用?PHP WYSIJA::deactivate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WYSIJA
的用法示例。
在下文中一共展示了WYSIJA::deactivate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add_action
}
//subscribers/wp-user synch hooks
add_action('user_register', array('WYSIJA', 'hook_add_WP_subscriber'), 1);
add_action('added_existing_user', array('WYSIJA', 'hook_add_WP_subscriber'), 1);
add_action('profile_update', array('WYSIJA', 'hook_edit_WP_subscriber'), 1);
add_action('delete_user', array('WYSIJA', 'hook_del_WP_subscriber'), 1);
//post notif trigger
add_action('transition_post_status', array('WYSIJA', 'hook_postNotification_transition'), 1, 3);
//add image size for emails
add_image_size('wysija-newsletters-max', 600, 99999);
$modelConf =& WYSIJA::get('config', 'model');
if ($modelConf->getValue('installed_time')) {
if ($modelConf->getValue('cron_manual')) {
//if cron queue is still set then unset it
if (wp_get_schedule('wysija_cron_queue')) {
WYSIJA::deactivate();
}
//set the crons schedule for each process
WYSIJA::get_cron_schedule();
} else {
//filter fixing a bug with automatic load_text_domain_from WP didn't understand yet why this was necessary...
//somehow wp_register_script(which is irrelevant) was triggerring this kind of notice
//Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(C:\Domains\website.com\wwwroot\web/wp-content/plugins/C:\Domains\website.com\wwwroot\web\wp-content\plugins\wysija-newsletters/languages/wysija-newsletters-en_US.mo) is not within the allowed path(s): (.;C:\Domains\;C:\PHP\;C:\Sites\;C:\SitesData\;/) in C:\Domains\website.com\wwwroot\web\wp-includes\l10n.php on line 339
//the only solution is to make sure on our end that the file exists and rewrite it if necessary
add_filter('override_load_textdomain', array('WYSIJA', 'override_load_textdomain'), 10, 3);
add_filter('load_textdomain_mofile', array('WYSIJA', 'load_textdomain_mofile'), 10, 2);
//filter to add new possible frequencies to the cron
add_filter('cron_schedules', array('WYSIJA', 'filter_cron_schedules'));
//action to handle the scheduled tasks in wysija
add_action('wysija_cron_queue', array('WYSIJA', 'croned_queue'));
add_action('wysija_cron_daily', array('WYSIJA', 'croned_daily'));
示例2: add_action
// post notif trigger
add_action('transition_post_status', array('WYSIJA', 'hook_postNotification_transition'), 1, 3);
// add image size for emails
add_image_size( 'wysija-newsletters-max', 600, 99999 );
$modelConf=WYSIJA::get('config','model');
if($modelConf->getValue('installed_time')){
// START all that concerns the CRON
// make sure we check when is the schedule due with wysija's cron
if($modelConf->getValue('cron_manual')){
// if WP cron tasks are still set, we clear them
if(wp_get_schedule('wysija_cron_queue')) WYSIJA::deactivate();
// set the crons schedule for each process
WYSIJA::get_cron_schedule();
// 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(!isset($_REQUEST['process'])){
WYSIJA::cron_check();
}
// this action is triggerred only by a cron job
// if we're entering the wysija's cron part, it should end here
if(isset($_REQUEST['action']) && $_REQUEST['action']=='wysija_cron'){
add_action('init', 'init_wysija_cron',1);
function init_wysija_cron(){