MS_Addon_Bbpress_Rule_Listtable

Membership List Table.

Defined (1)

The class is defined in the following location(s).

/app/addon/bbpress/rule/class-ms-addon-bbpress-rule-listtable.php  
  1. class MS_Addon_Bbpress_Rule_Listtable extends MS_Helper_ListTable_Rule { 
  2.  
  3. /** 
  4. * List-ID is only used to generate the list HTML code. 
  5. * @var string 
  6. */ 
  7. protected $id = 'rule_bbpress'; 
  8.  
  9. /** 
  10. * Define available columns 
  11. * @since 1.0.0 
  12. * @return array 
  13. */ 
  14. public function get_columns() { 
  15. return apply_filters( 
  16. 'ms_helper_listtable_' . $this->id . '_columns',  
  17. array( 
  18. 'cb' => true,  
  19. 'name' => __( 'Name', 'membership2' ),  
  20. 'access' => true,  
  21. ); 
  22.  
  23. /** 
  24. * Return list of sortable columns. 
  25. * @since 1.0.0 
  26. * @return array 
  27. */ 
  28. public function get_sortable_columns() { 
  29. return array(); 
  30.  
  31. /** 
  32. * Render the contents of the "name" column. 
  33. * @since 1.0.0 
  34. * @param object $item Item that is displayed, provided by the model. 
  35. * @return string The HTML code. 
  36. */ 
  37. public function column_name( $item ) { 
  38. $actions = array( 
  39. sprintf( 
  40. '<a href="%s">%s</a>',  
  41. get_edit_post_link( $item->id, true ),  
  42. __( 'Edit', 'membership2' ) 
  43. ),  
  44. sprintf( 
  45. '<a href="%s">%s</a>',  
  46. get_permalink( $item->id ),  
  47. __( 'View', 'membership2' ) 
  48. ),  
  49. ); 
  50.  
  51. $actions = apply_filters( 
  52. 'membership_helper_listtable_' . $this->id . '_column_name_actions',  
  53. $actions,  
  54. $item 
  55. ); 
  56.  
  57. return sprintf( 
  58. '%1$s %2$s',  
  59. $item->post_title,  
  60. $this->row_actions( $actions ) 
  61. ); 
  62.  
  63. /** 
  64. * Do not display a Title above the list. 
  65. * @since 1.0.0 
  66. */ 
  67. public function list_head() { 
  68.  
  69. /** 
  70. * Do not display a status-filter for this rule. 
  71. * @since 1.0.0 
  72. * @return array 
  73. */ 
  74. public function get_views() { 
  75. return array(); 
  76.