MS_Rule_Special_View

The WordPress Core MS Rule Special View class.

Defined (1)

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

/app/rule/special/class-ms-rule-special-view.php  
  1. class MS_Rule_Special_View extends MS_View { 
  2.  
  3. public function to_html() { 
  4. $membership = MS_Model_Membership::get_base(); 
  5. $rule = $membership->get_rule( MS_Rule_Special::RULE_ID ); 
  6.  
  7. $rule_listtable = new MS_Rule_Special_ListTable( $rule ); 
  8. $rule_listtable->prepare_items(); 
  9.  
  10. $header_data = apply_filters( 
  11. 'ms_view_membership_protectedcontent_header',  
  12. array( 
  13. 'title' => __( 'Choose Special WordPress Pages you want to protect', 'membership2' ),  
  14. 'desc' => '',  
  15. ),  
  16. MS_Rule_Special::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. $rule_listtable->views(); 
  27. $rule_listtable->search_box( __( 'Pages', 'membership2' ) ); 
  28. ?> 
  29. <form action="" method="post"> 
  30. <?php 
  31. $rule_listtable->display(); 
  32.  
  33. do_action( 
  34. 'ms_view_membership_protectedcontent_footer',  
  35. MS_Rule_Special::RULE_ID,  
  36. $this 
  37. ); 
  38. ?> 
  39. </form> 
  40. </div> 
  41. <?php 
  42.  
  43. MS_Helper_Html::settings_footer(); 
  44. return ob_get_clean(); 
  45.