| 1 |
<?php |
| 2 |
/** |
| 3 |
* Display the Charitable dashboard new page wrapper. |
| 4 |
* |
| 5 |
* @author David Bisset |
| 6 |
* @package Charitable/Admin View/Dashboard New |
| 7 |
* @copyright Copyright (c) 2023, WP Charitable LLC |
| 8 |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
| 9 |
* @since 1.8.8 |
| 10 |
* @version 1.8.8 |
| 11 |
*/ |
| 12 |
|
| 13 |
// Exit if accessed directly. |
| 14 |
if ( ! defined( 'ABSPATH' ) ) { |
| 15 |
exit; |
| 16 |
} |
| 17 |
|
| 18 |
// The header is automatically included by Charitable_Post_Types::admin_header() |
| 19 |
// when the page is registered in the applicable_post_types array |
| 20 |
|
| 21 |
// Get the dashboard instance |
| 22 |
$charitable_dashboard = Charitable_Dashboard::get_instance(); |
| 23 |
?> |
| 24 |
<div id="charitable-dashboard-v2" class="wrap"> |
| 25 |
<h1 class="screen-reader-text"><?php echo esc_html( get_admin_page_title() ); ?></h1> |
| 26 |
|
| 27 |
<?php do_action( 'charitable_maybe_show_notification' ); ?> |
| 28 |
|
| 29 |
<?php |
| 30 |
/** |
| 31 |
* Do or render something right before the dashboard new area. |
| 32 |
* |
| 33 |
* @since 1.8.1 |
| 34 |
*/ |
| 35 |
do_action( 'charitable_before_admin_dashboard_v2' ); |
| 36 |
?> |
| 37 |
|
| 38 |
<?php $charitable_dashboard->render_dashboard_header(); ?> |
| 39 |
|
| 40 |
<?php $charitable_dashboard->render_dashboard_notifications(); ?> |
| 41 |
|
| 42 |
<div class="charitable-dashboard-v2-content"> |
| 43 |
<div class="charitable-dashboard-v2-layout"> |
| 44 |
<!-- Left Column --> |
| 45 |
<div class="charitable-dashboard-v2-left-column"> |
| 46 |
<?php $charitable_dashboard->render_stats_section(); ?> |
| 47 |
|
| 48 |
<?php $charitable_dashboard->render_tabs_section(); ?> |
| 49 |
|
| 50 |
<?php $charitable_dashboard->render_upgrade_section(); ?> |
| 51 |
|
| 52 |
<?php |
| 53 |
// Show Quick Access in left column for Pro users (when upgrade section is hidden) |
| 54 |
if ( charitable_is_pro() ) { |
| 55 |
$charitable_dashboard->render_quick_access_section(); |
| 56 |
} |
| 57 |
?> |
| 58 |
</div> |
| 59 |
|
| 60 |
<!-- Right Column --> |
| 61 |
<div class="charitable-dashboard-v2-right-column"> |
| 62 |
<?php $charitable_dashboard->render_enhance_campaign_section(); ?> |
| 63 |
|
| 64 |
<?php $charitable_dashboard->render_latest_updates_section(); ?> |
| 65 |
|
| 66 |
<?php |
| 67 |
// Show Quick Access in right column for non-Pro users |
| 68 |
if ( ! charitable_is_pro() ) { |
| 69 |
$charitable_dashboard->render_quick_access_section(); |
| 70 |
} |
| 71 |
?> |
| 72 |
</div> |
| 73 |
</div> |
| 74 |
</div> |
| 75 |
|
| 76 |
<?php |
| 77 |
/** |
| 78 |
* Do or render something right after the dashboard new area. |
| 79 |
* |
| 80 |
* @since 1.8.1 |
| 81 |
*/ |
| 82 |
do_action( 'charitable_after_admin_dashboard_v2' ); |
| 83 |
?> |
| 84 |
|
| 85 |
<?php $charitable_dashboard->render_dashboard_scripts(); ?> |
| 86 |
</div> |