get_navigation_bar();
// If shortcode wasn't processed (plugin might be inactive), show helpful message
if (strpos($processed_content, '[tribe_community_events') !== false) {
if (class_exists('HVAC_Logger')) {
HVAC_Logger::warning('tribe_community_events shortcode not processed - plugin may be inactive', 'ManageEvent');
}
$error_content = '
Event Submission Form Unavailable
The event submission form is currently unavailable. Please ensure:
- The Events Calendar plugin is active
- The Events Calendar Community Events add-on is active
- You are logged in as a trainer
Return to Dashboard
';
return $navigation_html . $error_content;
}
// Wrap the form content with navigation and styling
$final_content = $navigation_html . '
' . $processed_content . '
';
return $final_content;
}
/**
* Generate the navigation bar HTML
*/
private function get_navigation_bar() {
// Check if Help System is available for tooltips
$help_available = class_exists('HVAC_Help_System');
$nav_html = '
';
return $nav_html;
}
/**
* Check authentication for manage-event page
*/
public function check_manage_event_auth() {
// Check if we're on the manage-event page
if (is_page('manage-event') && !is_user_logged_in()) {
// Redirect to login page
wp_redirect(home_url('/community-login/?redirect_to=' . urlencode($_SERVER['REQUEST_URI'])));
exit;
}
}
}