/app/rule/content/class-ms-rule-content-listtable.php

  1. <?php 
  2. /** 
  3. * Membership List Table 
  4. * 
  5. * @since 1.0.0 
  6. */ 
  7. class MS_Rule_Content_ListTable extends MS_Helper_ListTable_Rule { 
  8.  
  9. protected $id = MS_Rule_Content::RULE_ID; 
  10.  
  11. public function __construct( $model ) { 
  12. parent::__construct( $model ); 
  13. $this->name['singular'] = __( 'Content Part', 'membership2' ); 
  14. $this->name['plural'] = __( 'Content Parts', 'membership2' ); 
  15.  
  16. public function get_columns() { 
  17. $columns = array( 
  18. 'cb' => true,  
  19. 'name' => __( 'Content Part', 'membership2' ),  
  20. 'access' => true,  
  21. ); 
  22.  
  23. if ( MS_Model_Membership::TYPE_DRIPPED !== $this->membership->type ) { 
  24. unset( $columns['dripped'] ); 
  25.  
  26. return apply_filters( 
  27. "ms_helper_listtable_{$this->id}_columns",  
  28. $columns 
  29. ); 
  30.  
  31. public function column_name( $item ) { 
  32. return $item->name; 
  33.  
  34. /** 
  35. * This rule has only one view. 
  36. * 
  37. * @since 1.0.0 
  38. */ 
  39. public function get_views() { 
  40. return array(); 
  41.  
.