| 1 |
<?php |
| 2 |
|
| 3 |
// Exit if accessed directly. |
| 4 |
if ( ! defined( 'ABSPATH' ) ) { |
| 5 |
exit; |
| 6 |
} |
| 7 |
|
| 8 |
/** |
| 9 |
* Display the main about page wrapper. |
| 10 |
* |
| 11 |
* @author David Bisset |
| 12 |
* @package Charitable/Admin View/About |
| 13 |
* @copyright Copyright (c) 2024, WP Charitable LLC |
| 14 |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
| 15 |
* @since 1.8.7.6 |
| 16 |
* @version 1.8.7.6 |
| 17 |
*/ |
| 18 |
|
| 19 |
$active_view = isset( $_GET['view'] ) ? esc_html( $_GET['view'] ) : 'about'; // phpcs:ignore |
| 20 |
|
| 21 |
ob_start(); |
| 22 |
?> |
| 23 |
|
| 24 |
<div id="charitable-about" class="wrap"> |
| 25 |
<h1 class="screen-reader-text"><?php echo esc_html( get_admin_page_title() ); ?></h1> |
| 26 |
<h1 class="charitable-about-hidden-title"><?php echo esc_html( get_admin_page_title() ); ?></h1> |
| 27 |
<?php do_action( 'charitable_maybe_show_notification' ); ?> |
| 28 |
|
| 29 |
<h2 class="nav-tab-wrapper"> |
| 30 |
<a href="<?php echo esc_url( admin_url( 'admin.php?page=charitable-about&view=about' ) ); ?>" class="nav-tab <?php echo $active_view == 'about' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'About Us', 'charitable' ); ?></a> |
| 31 |
<a href="<?php echo esc_url( admin_url( 'admin.php?page=charitable-setup-checklist' ) ); ?>" class="nav-tab"><?php esc_html_e( 'Getting Started', 'charitable' ); ?></a> |
| 32 |
<a href="<?php echo esc_url( admin_url( 'admin.php?page=charitable-about&view=lite-vs-pro' ) ); ?>" class="nav-tab <?php echo $active_view == 'lite-vs-pro' ? 'nav-tab-active' : ''; ?>"><?php esc_html_e( 'Lite vs Pro', 'charitable' ); ?></a> |
| 33 |
</h2> |
| 34 |
|
| 35 |
<?php |
| 36 |
// Load the appropriate tab content |
| 37 |
switch ( $active_view ) { |
| 38 |
case 'about': |
| 39 |
charitable_admin_view( 'about/tabs/about-us' ); |
| 40 |
break; |
| 41 |
case 'lite-vs-pro': |
| 42 |
charitable_admin_view( 'about/tabs/lite-vs-pro' ); |
| 43 |
break; |
| 44 |
default: |
| 45 |
charitable_admin_view( 'about/tabs/about-us' ); |
| 46 |
break; |
| 47 |
} |
| 48 |
?> |
| 49 |
|
| 50 |
</div> |
| 51 |
|
| 52 |
<?php |
| 53 |
echo ob_get_clean(); // phpcs:ignore |
| 54 |
|