当前位置: 首页>>代码示例>>PHP>>正文


PHP NewsletterModule::__construct方法代码示例

本文整理汇总了PHP中NewsletterModule::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP NewsletterModule::__construct方法的具体用法?PHP NewsletterModule::__construct怎么用?PHP NewsletterModule::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NewsletterModule的用法示例。


在下文中一共展示了NewsletterModule::__construct方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 function __construct()
 {
     parent::__construct('subscription', '1.1.1');
     add_action('wp_login', array($this, 'hook_wp_login'));
     // Must be called after the Newsletter::hook_init, since some constants are defined
     // there.
     add_action('init', array($this, 'hook_init'), 90);
 }
开发者ID:taeche,项目名称:SoDoEx,代码行数:8,代码来源:subscription.php

示例2: isset

 function __construct()
 {
     // Grab it before a plugin decides to remove it.
     $this->action = isset($_REQUEST['na']) ? $_REQUEST['na'] : '';
     parent::__construct('subscription', '1.1.5');
     add_action('wp_login', array($this, 'hook_wp_login'));
     // Must be called after the Newsletter::hook_init, since some constants are defined
     // there.
     add_action('init', array($this, 'hook_init'), 90);
 }
开发者ID:hbenbrahim,项目名称:wp-capdema,代码行数:10,代码来源:subscription.php

示例3: isset

 function __construct()
 {
     // Grab it before a (stupid) plugin removes it.
     $this->action = isset($_REQUEST['na']) ? $_REQUEST['na'] : '';
     $this->themes = new NewsletterThemes('emails');
     parent::__construct('emails', '1.1.1');
     if (!is_admin() && !empty($this->action)) {
         add_action('wp_loaded', array($this, 'hook_wp_loaded'));
     }
 }
开发者ID:raminabsari,项目名称:phonicsschool,代码行数:10,代码来源:emails.php

示例4: list

 function __construct()
 {
     global $wpdb;
     parent::__construct('statistics', '1.1.0');
     // Link tracking redirect
     if (isset($_GET['nltr'])) {
         list($email_id, $user_id, $url, $anchor) = explode(';', base64_decode($_GET['nltr']), 4);
         $wpdb->insert(NEWSLETTER_STATS_TABLE, array('email_id' => $email_id, 'user_id' => $user_id, 'url' => $url, 'anchor' => $anchor, 'ip' => $_SERVER['REMOTE_ADDR']));
         header('Location: ' . $url);
         die;
     }
     // Open tracking image
     if (isset($_GET['noti'])) {
         list($email_id, $user_id) = explode(';', base64_decode($_GET['noti']), 2);
         $wpdb->insert(NEWSLETTER_STATS_TABLE, array('email_id' => $email_id, 'user_id' => $user_id, 'ip' => $_SERVER['REMOTE_ADDR']));
         header('Content-Type: image/gif');
         echo base64_decode('_R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7');
         die;
     }
 }
开发者ID:kfwebdev,项目名称:wp-atd,代码行数:20,代码来源:statistics.php

示例5: time

 function __construct()
 {
     $this->time_start = time();
     // Here because the upgrade is called by the parent constructor and uses the scheduler
     add_filter('cron_schedules', array($this, 'hook_cron_schedules'), 1000);
     parent::__construct('main', '1.2.2');
     $max = $this->options['scheduler_max'];
     if (!is_numeric($max)) {
         $max = 100;
     }
     $this->max_emails = max(floor($max / 12), 1);
     add_action('init', array($this, 'hook_init'));
     add_action('newsletter', array($this, 'hook_newsletter'), 1);
     add_action('newsletter_extension_versions', array($this, 'hook_newsletter_extension_versions'), 1);
     // This specific event is created by "Feed by mail" panel on configuration
     add_action('shutdown', array($this, 'hook_shutdown'));
     if (defined('DOING_CRON') && DOING_CRON) {
         $calls = get_option('newsletter_diagnostic_cron_calls', array());
         if (empty($calls)) {
             add_option('newsletter_diagnostic_cron_calls', $calls, null, 'no');
         }
         $calls[] = time();
         if (count($calls) > self::MAX_CRON_SAMPLES) {
             array_shift($calls);
         }
         update_option('newsletter_diagnostic_cron_calls', $calls);
         return;
     }
     // TODO: Meditation on how to use those ones...
     register_activation_hook(__FILE__, array($this, 'hook_activate'));
     //register_deactivation_hook(__FILE__, array(&$this, 'hook_deactivate'));
     add_action('admin_init', array($this, 'hook_admin_init'));
     add_action('wp_head', array($this, 'hook_wp_head'));
     add_shortcode('newsletter_lock', array($this, 'shortcode_newsletter_lock'));
     add_filter('the_content', array($this, 'hook_the_content'), 99);
     //add_shortcode('newsletter_profile', array($this, 'shortcode_newsletter_profile'));
     if (is_admin()) {
         add_action('admin_head', array($this, 'hook_admin_head'));
         // Protection against strange schedule removal on some installations
         if (!wp_next_scheduled('newsletter') && !defined('WP_INSTALLING')) {
             wp_schedule_event(time() + 30, 'newsletter', 'newsletter');
         }
     }
 }
开发者ID:blocher,项目名称:oneholyname,代码行数:44,代码来源:plugin.php

示例6: NewsletterThemes

 function __construct()
 {
     $this->themes = new NewsletterThemes('emails');
     parent::__construct('emails', '1.1.2');
     add_action('wp_loaded', array($this, 'hook_wp_loaded'));
 }
开发者ID:jrialland,项目名称:site-plr,代码行数:6,代码来源:emails.php

示例7:

 function __construct()
 {
     parent::__construct('users', '1.0.4');
 }
开发者ID:ilke-zilci,项目名称:newcomers-wp,代码行数:4,代码来源:users.php

示例8: array

 function __construct()
 {
     global $wpdb;
     parent::__construct('statistics', '1.1.4');
     add_action('wp_loaded', array($this, 'hook_wp_loaded'));
 }
开发者ID:ilke-zilci,项目名称:newcomers-wp,代码行数:6,代码来源:statistics.php

示例9: array

 function __construct()
 {
     parent::__construct('wp', '1.0.1');
     add_action('init', array($this, 'hook_init'), 90);
 }
开发者ID:radikalportal,项目名称:radikalportal,代码行数:5,代码来源:wp.php

示例10: NewsletterThemes

 function __construct()
 {
     $this->themes = new NewsletterThemes('emails');
     parent::__construct('emails', '1.1.1');
 }
开发者ID:manhhung86it,项目名称:builder-site,代码行数:5,代码来源:emails.php


注:本文中的NewsletterModule::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。