| 1 |
<?php |
| 2 |
/** |
| 3 |
* Display the main settings page wrapper. |
| 4 |
* |
| 5 |
* @author Studio 164a |
| 6 |
* @package Charitable/Admin View/Settings |
| 7 |
* @since 1.0.0 |
| 8 |
*/ |
| 9 |
|
| 10 |
$active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'general'; |
| 11 |
$group = isset( $_GET[ 'group' ] ) ? $_GET[ 'group' ] : $active_tab; |
| 12 |
|
| 13 |
ob_start(); |
| 14 |
?> |
| 15 |
<div class="wrap"> |
| 16 |
<h2 class="nav-tab-wrapper"> |
| 17 |
<?php foreach( charitable_get_admin_settings()->get_sections() as $tab => $name ) : ?> |
| 18 |
<a href="<?php echo esc_url( add_query_arg( array( 'tab' => $tab ), admin_url( 'admin.php?page=charitable-settings' ) ) ) ?>" class="nav-tab <?php echo $active_tab == $tab ? 'nav-tab-active' : '' ?>"><?php echo $name ?></a> |
| 19 |
<?php endforeach ?> |
| 20 |
</h2> |
| 21 |
|
| 22 |
<div id="tab_container"> |
| 23 |
<form method="post" action="options.php"> |
| 24 |
<table class="form-table"> |
| 25 |
<?php |
| 26 |
settings_fields( 'charitable_settings' ); |
| 27 |
charitable_do_settings_fields( 'charitable_settings_' . $group, 'charitable_settings_' . $group ); |
| 28 |
?> |
| 29 |
</table> |
| 30 |
<?php |
| 31 |
submit_button(); |
| 32 |
?> |
| 33 |
</form> |
| 34 |
</div> |
| 35 |
</div> |
| 36 |
<?php |
| 37 |
echo ob_get_clean(); |