Please log in to view the dashboard.

Login

'; } if (!current_user_can('view_hvac_dashboard')) { return '

You do not have permission to view this dashboard.

'; } return $this->get_dashboard_content(); } /** * Render dashboard content for the page */ public function render_dashboard_content($content) { // Only process if content contains our shortcode if (has_shortcode($content, 'hvac_trainer_dashboard')) { return do_shortcode($content); } return $content; } /** * Get dashboard content */ private function get_dashboard_content() { $user_id = get_current_user_id(); // Include dashboard data class require_once HVAC_CE_PLUGIN_DIR . 'includes/class-hvac-dashboard-data.php'; $dashboard_data = new HVAC_Dashboard_Data($user_id); // Get data $data = array( 'total_events' => $dashboard_data->get_total_events_count(), 'upcoming_events' => $dashboard_data->get_upcoming_events_count(), 'past_events' => $dashboard_data->get_past_events_count(), 'total_sold' => $dashboard_data->get_total_tickets_sold(), 'total_revenue' => $dashboard_data->get_total_revenue(), 'revenue_target' => $dashboard_data->get_annual_revenue_target(), 'events_table' => $dashboard_data->get_events_table_data(isset($_GET['event_status']) ? sanitize_key($_GET['event_status']) : 'all'), 'current_filter' => isset($_GET['event_status']) ? sanitize_key($_GET['event_status']) : 'all' ); // Get dashboard HTML ob_start(); ?>

Trainer Dashboard

Your Stats

Total Events

Upcoming Events

Past Events

Tickets Sold

Total Revenue

$

Target: $

Your Events

Filter:
Status Event Name Date Organizer Capacity Sold Revenue Actions
$ Edit | Summary

No events found.