[ Index ]

MailPress 544

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-includes/class/ -> MP_newsletter_scheduler_.class.php (source)

   1  <?php
   2  abstract class MP_newsletter_scheduler_ extends MP_newsletter_
   3  {
   4      public $args = 'scheduler';
   5      public static $delta = 1;
   6  
   7  	function __construct($description)
   8      {
   9          parent::__construct($description);
  10  
  11          add_filter('MailPress_newsletter_scheduler_' . $this->id . '_schedule',    array($this, 'schedule'), 8, 1);
  12      }
  13  
  14  	function schedule($newsletter) { $this->newsletter = $newsletter; return false; }
  15  
  16  	function schedule_single_event($timestamp, $event = 'mp_process_newsletter')
  17      {
  18          $timestamp   += self::$delta;
  19          self::$delta += 1;
  20  
  21          wp_schedule_single_event( $timestamp, $event, array('args' => array('newsletter' => $this->newsletter )) );
  22  
  23          return MP_Newsletter_schedulers::schedule_report($this->newsletter, $timestamp, $this->id );
  24      }
  25  }


Generated: Thu Apr 28 18:38:52 2016 Cross-referenced by PHPXref 0.7.1