<?php
/* ------------------------------------------------------------------------ *
 * Seja Framework Version 3.0
 *
 * 4.0 Theme Help 
 * ------------------------------------------------------------------------ */

function seja_menu_help_display() {
	
	if( isset( $_GET[ 'tab' ] ) ) {  
        $active_tab = $_GET[ 'tab' ];
		$page_number = '4'; 
    } else {
		$active_tab = 'basic-shortcode';
		$page_number = '4';
	}
	
	?>
	<!-- Create a header in the default WordPress 'wrap' container --> 
    <div class="wrap">
    	<?php screen_icon(); ?>
	    <h2>Theme Help</h2>
        <h3 class="nav-tab-wrapper">
        	<a href="admin.php?page=seja-help-page&amp;tab=basic-shortcode" class="nav-tab <?php echo $active_tab == 'basic-shortcode' ? 'nav-tab-active' : ''; ?>">Basic Shortcode</a>
            <a href="admin.php?page=seja-help-page&amp;tab=advanced-shortcode" class="nav-tab <?php echo $active_tab == 'advanced-shortcode' ? 'nav-tab-active' : ''; ?>">Advanced Shortcode</a>
            <a href="admin.php?page=seja-help-page&amp;tab=formatting-elements" class="nav-tab <?php echo $active_tab == 'formatting-elements' ? 'nav-tab-active' : ''; ?>">Custom Formatting Elements</a>
            <a href="admin.php?page=seja-help-page&amp;tab=scroll-page" class="nav-tab <?php echo $active_tab == 'scroll-page' ? 'nav-tab-active' : ''; ?>">Create a Scroll Page</a>
            <a href="admin.php?page=seja-help-page&amp;tab=customising-layout" class="nav-tab <?php echo $active_tab == 'customising-layout' ? 'nav-tab-active' : ''; ?>">Customising the Layout</a>
          <a href="admin.php?page=seja-help-page&amp;tab=font-awesome" class="nav-tab <?php echo $active_tab == 'font-awesome' ? 'nav-tab-active' : ''; ?>">Font Awesome</a>
           <!-- <a href="admin.php?page=seja-help-page&amp;tab=solutions" class="nav-tab <?php //echo $active_tab == 'solutions' ? 'nav-tab-active' : ''; ?>">Formatting Solutions</a> -->
        </h3>
        <?php settings_errors(); ?>
        
        <form method="post" action="options.php">
        <?php 
			// tab 1
			if( $active_tab == 'basic-shortcode' ) {
				settings_fields( 'seja_basic_shortcode_options' );
            	do_settings_sections( 'seja_basic_shortcode_options' ); 
			}
			// tab 2
			if( $active_tab == 'advanced-shortcode' ) {
				settings_fields( 'seja_advanced_shortcode_options' );
            	do_settings_sections( 'seja_advanced_shortcode_options' ); 
			}
			// tab 3
			if( $active_tab == 'formatting-elements' ) {
				settings_fields( 'seja_formatting_options' );
            	do_settings_sections( 'seja_formatting_options' ); 
			}
			//tab 4
			if( $active_tab == 'scroll-page' ) {
				settings_fields( 'seja_scrollpage_options' );
            	do_settings_sections( 'seja_scrollpage_options' ); 
			}
			//tab 5
			if( $active_tab == 'customising-layout' ) {
				settings_fields( 'seja_customising_options' );
            	do_settings_sections( 'seja_customising_options' ); 
			}
			//tab 6
			if( $active_tab == 'font-awesome' ) {
				settings_fields( 'seja_font_awesome_options' );
            	do_settings_sections( 'seja_font_awesome_options' ); 
			}
			//tab 7 PENDING
			if( $active_tab == 'solutions' ) {
				settings_fields( 'seja_solutions_options' );
            	do_settings_sections( 'seja_solutions_options' ); 
			}
			?>
        
            <?php //submit_button(); ?> 
        </form>
	</div>
    <?php
	
}

?>