MS_Addon_Bbpress_Rule_View

The Membership 2 MS Addon Bbpress Rule View class.

Defined (1)

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

/app/addon/bbpress/rule/class-ms-addon-bbpress-rule-view.php  
  1. class MS_Addon_Bbpress_Rule_View extends MS_View { 
  2.  
  3. public function to_html() { 
  4. $membership = MS_Model_Membership::get_base(); 
  5. $rule = $membership->get_rule( MS_Addon_Bbpress_Rule::RULE_ID ); 
  6.  
  7. $listtable = new MS_Addon_Bbpress_Rule_Listtable( $rule ); 
  8. $listtable->prepare_items(); 
  9.  
  10. $header_data = apply_filters( 
  11. 'ms_view_membership_protectedcontent_header',  
  12. array( 
  13. 'title' => __( 'bbPress', 'membership2' ),  
  14. 'desc' => __( 'Protect the following bbPress content to members only.', 'membership2' ),  
  15. ),  
  16. MS_Addon_Bbpress_Rule::RULE_ID,  
  17. $this 
  18. ); 
  19.  
  20. ob_start(); 
  21. ?> 
  22. <div class="ms-settings"> 
  23. <?php 
  24. MS_Helper_Html::settings_tab_header( $header_data ); 
  25.  
  26. $listtable->views(); 
  27. ?> 
  28. <form action="" method="post"> 
  29. <?php $listtable->display(); ?> 
  30. </form> 
  31. </div> 
  32. <?php 
  33. MS_Helper_Html::settings_footer(); 
  34.  
  35. return ob_get_clean(); 
  36.