[ Index ]

MailPress 7.2

[ 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          $advanced_path = 'advanced/' . get_current_blog_id() . "/newsletters/{$this->post_type}/{$this->taxonomy_s}";
  11  
  12          $this->args = array(     'root'         => MP_UPL_ABSPATH . $advanced_path,
  13                          'root_filter'     => "MailPress_advanced_newsletters{$filter}_root",
  14                          'folder'        => $this->taxonomy_s,
  15                          'files'        => array( $this->taxonomy_s ),
  16  
  17                          'taxonomy'        => $this->taxonomy,
  18                          'get_terms_args'=> array( 'hide_empty' => 0 ),
  19  
  20                          'Template'        => $this->post_type,
  21  
  22                          'post_type'    => $this->post_type,
  23           );
  24      }
  25  
  26  	function register() 
  27      {
  28          MP_Newsletter::register_taxonomy( $this->args );
  29      }
  30  
  31  	function subscriptions_newsletter_th( $th, $newsletter )
  32      {
  33          if (     isset( $newsletter['params']['post_type'] )     && $this->post_type == $newsletter['params']['post_type'] && 
  34              isset( $newsletter['params']['taxonomy'] )     && $this->taxonomy  == $newsletter['params']['taxonomy'] ) 
  35              return $newsletter['mail']['the_post_type'] . '/' .  $newsletter['mail']['the_taxonomy'] ;
  36          return $th;
  37      }
  38  }


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