[ Index ]

MailPress 7.2

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

title

Body

[close]

/mp-includes/class/options/newsletter/schedulers/ -> day.php (source)

   1  <?php
   2  class MP_Newsletter_scheduler_day extends MP_newsletter_scheduler_
   3  {
   4      public $id = 'day';
   5  
   6  	function schedule( $newsletter ) 
   7      { 
   8          $this->newsletter = $newsletter;
   9  
  10          $y = $this->year;
  11          $m = $this->month;
  12          $d = $this->day;
  13  
  14          $this->get_slot_context();  /* 1 slot is 24 hours is the default */
  15  
  16          if ( $this->slot_overnight )
  17          {
  18              $d--;
  19              if ( !$d )
  20              {
  21                  $m--;
  22                  if ( $m == 0 ) { $y--; $m = 12; }
  23                  $d = $this->get_last_day( $y, $m );            
  24              }
  25          }
  26  
  27          return $this->schedule_single_event( $this->format_date( $y, $m, $d ) . ' ' . $this->slots[$this->slot] );
  28      }
  29  }
  30  new MP_Newsletter_scheduler_day( __( 'Every day', 'MailPress' ) );


Generated: Tue May 19 15:55:14 2020 Cross-referenced by PHPXref 0.7.1