[ Index ]

MailPress 544

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

title

Body

[close]

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

   1  <?php
   2  abstract class MP_newsletter_post_type_taxonomy_ extends MP_newsletter_post_type_
   3  {
   4  	function __construct() 
   5      {
   6          parent::__construct();
   7  
   8          $filter = ('post' == $this->post_type) ? '' : "_{$this->post_type}";
   9  
  10          $this->args = array(    'root'         => MP_CONTENT_DIR . "advanced/newsletters/{$this->post_type}/{$this->taxonomy_s}",
  11                          'root_filter'     => "MailPress_advanced_newsletters{$filter}_root",
  12                          'folder'        => $this->taxonomy_s,
  13                          'files'        => array($this->taxonomy_s),
  14  
  15                          'taxonomy'        => $this->taxonomy,
  16                          'get_terms_args'=> array('hide_empty' => 0),
  17  
  18                          'Template'        => $this->post_type,
  19  
  20                          'post_type'    => $this->post_type,
  21          );
  22      }
  23  
  24  	function register() 
  25      {
  26          MP_Newsletter::register_taxonomy($this->args);
  27      }
  28  
  29  	function subscriptions_newsletter_th($th, $newsletter)
  30      {
  31          if (    isset($newsletter['params']['post_type'])     && $this->post_type == $newsletter['params']['post_type'] && 
  32              isset($newsletter['params']['taxonomy'])     && $this->taxonomy  == $newsletter['params']['taxonomy']) 
  33              return $newsletter['mail']['the_post_type'] . '/' .  $newsletter['mail']['the_taxonomy'] ;
  34          return $th;
  35      }
  36  }


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