| 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 id="charitable-settings" class="wrap"> |
| 16 |
<h1 class="screen-reader-text"><?php echo get_admin_page_title(); ?></ha> |
| 17 |
<h2 class="nav-tab-wrapper"> |
| 18 |
<?php foreach ( charitable_get_admin_settings()->get_sections() as $tab => $name ) : ?> |
| 19 |
<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> |
| 20 |
<?php endforeach ?> |
| 21 |
</h2> |
| 22 |
<?php do_action( 'charitable_before_admin_settings', $group ) ?> |
| 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 |
<?php do_action( 'charitable_after_admin_settings', $group ) ?> |
| 35 |
</div> |
| 36 |
<?php |
| 37 |
echo ob_get_clean(); |
| 38 |
|