epm_options_page

Options Page.

Description

epm_options_page(); 

Renders the options page contents.


Usage

  1. if ( !function_exists( 'epm_options_page' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'easy-peasy-mailchimp-ajax-form/includes/admin/settings/display-settings.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = epm_options_page(); 
  7.  

Defined (1)

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

/includes/admin/settings/display-settings.php  
  1. function epm_options_page() { 
  2. global $epm_options; 
  3.  
  4. $active_tab = isset( $_GET[ 'tab' ] ) && array_key_exists( $_GET['tab'], epm_get_settings_tabs() ) ? $_GET[ 'tab' ] : 'general'; 
  5.  
  6. ob_start(); 
  7. ?> 
  8. <div class="wrap"> 
  9.  
  10. <h2><?php _e('Easy Peasy MailChimp Settings', 'easy-peasy-mailchimp');?> <?php do_action('epm_next_to_settings_title');?></h2> 
  11. <br/> 
  12.  
  13. <h2 class="nav-tab-wrapper"> 
  14. <?php 
  15. foreach( epm_get_settings_tabs() as $tab_id => $tab_name ) { 
  16.  
  17. $tab_url = add_query_arg( array( 
  18. 'settings-updated' => false,  
  19. 'tab' => $tab_id 
  20. ) ); 
  21.  
  22. $active = $active_tab == $tab_id ? ' nav-tab-active' : ''; 
  23.  
  24. echo '<a href="' . esc_url( $tab_url ) . '" title="' . esc_attr( $tab_name ) . '" class="nav-tab' . $active . '">'; 
  25. echo esc_html( $tab_name ); 
  26. echo '</a>'; 
  27. ?> 
  28. </h2> 
  29.  
  30. <div id="poststuff" class="metabox-holder has-right-sidebar"> 
  31.  
  32. <div class="inner-sidebar"> 
  33. <div id="side-sortables" class="meta-box-sortables ui-sortable"> 
  34. <?php do_action('epm_settings_sidebar');?> 
  35. </div> 
  36. </div> 
  37.  
  38. <div id="post-body"> 
  39. <div id="post-body-content"> 
  40. <div id="normal-sortables" class="meta-box-sortables ui-sortable"> 
  41. <form method="post" action="options.php"> 
  42. <table class="form-table"> 
  43. <?php 
  44. settings_fields( 'epm_settings' ); 
  45. do_settings_fields( 'epm_settings_' . $active_tab, 'epm_settings_' . $active_tab ); 
  46. ?> 
  47. </table> 
  48. <?php submit_button(); ?> 
  49. </form> 
  50. </div> 
  51. </div> 
  52. </div> 
  53. <br class="clear"> 
  54. </div> 
  55.  
  56. </div><!-- .wrap --> 
  57. <?php 
  58. echo ob_get_clean();