Created
December 2, 2020 11:50
-
-
Save paulmiller3000/06c8a9e4c9eecf4a2b9eb13d5ff7eeb2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function bsd_tup_plugin_options_page() { | |
?> | |
<div class='wrap'> | |
<h1><?php _e('BSD Team and User Profiles', 'bsd-team-user-profiles' ); ?></h1> | |
<div id='poststuff'> | |
<div id='post-body' class='metabox-holder columns-2'> | |
<!-- Content --> | |
<div id='post-body-content'> | |
<div class='inside'> | |
<?php | |
$active_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : 'main'; | |
?> | |
<h2 class='nav-tab-wrapper bsd-team-user-profiles-settings-header'> | |
<a | |
href='?page=bsd-team-user-profiles&tab=main' | |
class="nav-tab <?php echo $active_tab == 'main' ? 'nav-tab-active' : ''; ?>"> | |
Main Settings | |
</a> | |
<a | |
href='?page=bsd-team-user-profiles&tab=acf' | |
class="nav-tab <?php echo $active_tab == 'acf' ? 'nav-tab-active' : ''; ?>"> | |
Advanced Custom Fields | |
</a> | |
<a | |
href='?page=bsd-team-user-profiles&tab=search_filter' | |
class="nav-tab <?php echo $active_tab == 'search_filter' ? 'nav-tab-active' : ''; ?>"> | |
Search & Filter | |
</a> | |
<a | |
href='?page=bsd-team-user-profiles&tab=third_party' | |
class="nav-tab <?php echo $active_tab == 'third_party' ? 'nav-tab-active' : ''; ?>"> | |
Third Party | |
</a> | |
</h2> | |
<form method='POST' action='admin-post.php'> | |
<input type='hidden' name='action' value='BSD_TUP_save_options'> | |
<?php | |
switch ($active_tab) { | |
case 'acf': | |
include_once( 'partials/tab-acf-options.php' ); | |
break; | |
case 'main': | |
include_once( 'partials/tab-main.php' ); | |
break; | |
case 'search_filter': | |
include_once( 'partials/tab-search-filter-options.php' ); | |
break; | |
case 'third_party': | |
include( 'partials/tab-third-party-options.php' ); | |
break; | |
} | |
?> | |
</form> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment