Event Submission Form Unavailable

The event submission form is currently unavailable. Please ensure:

Return to Dashboard

'; return $error_content; } // Return the processed content without wrapping return $processed_content; } /** * Add CSS styles for event form */ public function add_event_form_styles() { // Check if we're on the manage page $is_manage_page = false; if (is_page('manage-event') || is_page('trainer-event-manage') || is_page(5334)) { $is_manage_page = true; } $current_path = trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/'); if ($current_path === 'trainer/event/manage' || $current_path === 'trainer/event/manage/') { $is_manage_page = true; } if (!$is_manage_page) { return; } echo ''; } /** * Check authentication for manage-event page */ public function check_manage_event_auth() { // Check if we're on the manage page using multiple methods $is_manage_page = false; // Method 1: Check by specific slugs if (is_page('manage-event') || is_page('trainer-event-manage')) { $is_manage_page = true; } // Method 2: Check by post ID if (is_page(5334)) { $is_manage_page = true; } // Method 3: Check by URL path $current_path = trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/'); if ($current_path === 'trainer/event/manage' || $current_path === 'trainer/event/manage/') { $is_manage_page = true; } // Check if we're on the manage page (event creation page) and not logged in if ($is_manage_page && !is_user_logged_in()) { // Redirect to login page wp_redirect(home_url('/training-login/?redirect_to=' . urlencode($_SERVER['REQUEST_URI']))); exit; } } }