'; // Ensure user is logged in and has access to the dashboard if ( ! is_user_logged_in() ) { // Redirect to login page if not logged in wp_safe_redirect( home_url( '/community-login/' ) ); exit; } // Check if user has permission to view dashboard // Allow administrators and users with view_hvac_dashboard capability if ( ! current_user_can( 'view_hvac_dashboard' ) && ! current_user_can( 'manage_options' ) ) { // Show access denied message instead of redirect to prevent loops get_header(); ?>
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(); // --- Template Start --- // Don't call get_header() here - this template is included via shortcode // The page template already handles header/footer ?>$
Target: $| Status | Event Name | Date | Organizer | Capacity | Sold | Revenue | Actions |
|---|---|---|---|---|---|---|---|
| $ | Edit | Summary | View | ||||||
| No events found. | |||||||