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); }
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); }
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')); } }
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; } }
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'); } } }
function __construct() { $this->themes = new NewsletterThemes('emails'); parent::__construct('emails', '1.1.2'); add_action('wp_loaded', array($this, 'hook_wp_loaded')); }
function __construct() { parent::__construct('users', '1.0.4'); }
function __construct() { global $wpdb; parent::__construct('statistics', '1.1.4'); add_action('wp_loaded', array($this, 'hook_wp_loaded')); }
function __construct() { parent::__construct('wp', '1.0.1'); add_action('init', array($this, 'hook_init'), 90); }
function __construct() { parent::__construct('feed', '1.0.0'); }
function __construct() { $this->themes = new NewsletterThemes('emails'); parent::__construct('emails', '1.1.1'); }
function __construct() { parent::__construct('statistics', '1.1.0'); }