## Major Enhancements ### 🏗️ Architecture & Infrastructure - Implement comprehensive Docker testing infrastructure with hermetic environment - Add Forgejo Actions CI/CD pipeline for automated deployments - Create Page Object Model (POM) testing architecture reducing test duplication by 90% - Establish security-first development patterns with input validation and output escaping ### 🧪 Testing Framework Modernization - Migrate 146+ tests from 80 duplicate files to centralized architecture - Add comprehensive E2E test suites for all user roles and workflows - Implement WordPress error detection with automatic site health monitoring - Create robust browser lifecycle management with proper cleanup ### 📚 Documentation & Guides - Add comprehensive development best practices guide - Create detailed administrator setup documentation - Establish user guides for trainers and master trainers - Document security incident reports and migration guides ### 🔧 Core Plugin Features - Enhance trainer profile management with certification system - Improve find trainer functionality with advanced filtering - Strengthen master trainer area with content management - Add comprehensive venue and organizer management ### 🛡️ Security & Reliability - Implement security-first patterns throughout codebase - Add comprehensive input validation and output escaping - Create secure credential management system - Establish proper WordPress role-based access control ### 🎯 WordPress Integration - Strengthen singleton pattern implementation across all classes - Enhance template hierarchy with proper WordPress integration - Improve page manager with hierarchical URL structure - Add comprehensive shortcode and menu system ### 🔍 Developer Experience - Add extensive debugging and troubleshooting tools - Create comprehensive test data seeding scripts - Implement proper error handling and logging - Establish consistent code patterns and standards ### 📊 Performance & Optimization - Optimize database queries and caching strategies - Improve asset loading and script management - Enhance template rendering performance - Streamline user experience across all interfaces 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
		
			
				
	
	
		
			76 lines
		
	
	
	
		
			2.6 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			76 lines
		
	
	
	
		
			2.6 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * Template Name: Trainer Venue Manage
 | |
|  * Description: Template for creating/editing training venues
 | |
|  */
 | |
| 
 | |
| // Define constant to indicate we are in a page template
 | |
| define('HVAC_IN_PAGE_TEMPLATE', true);
 | |
| 
 | |
| get_header();
 | |
| ?>
 | |
| 
 | |
| <div class="hvac-page-wrapper hvac-trainer-venue-manage-page">
 | |
|     <?php
 | |
|     // Display trainer navigation menu
 | |
|     if (class_exists('HVAC_Menu_System')) {
 | |
|         HVAC_Menu_System::instance()->render_trainer_menu();
 | |
|     }
 | |
|     ?>
 | |
|     
 | |
|     <?php
 | |
|     // Display breadcrumbs
 | |
|     if (class_exists('HVAC_Breadcrumbs')) {
 | |
|         echo HVAC_Breadcrumbs::instance()->render_breadcrumbs();
 | |
|     }
 | |
|     ?>
 | |
|     
 | |
|     <div class="container">
 | |
|         <?php
 | |
|         // --- Security Check & Data Loading ---
 | |
|         // Ensure user is logged in and has access
 | |
|         if (!is_user_logged_in()) {
 | |
|             // Redirect to login page if not logged in
 | |
|             wp_safe_redirect(home_url('/training-login/'));
 | |
|             exit;
 | |
|         }
 | |
| 
 | |
|         // Check if user has permission to manage venues
 | |
|         // Check for HVAC trainer roles (not capabilities!)
 | |
|         $user = wp_get_current_user();
 | |
|         $has_trainer_role = in_array('hvac_trainer', $user->roles) || in_array('hvac_master_trainer', $user->roles);
 | |
|         
 | |
|         if (!$has_trainer_role && !current_user_can('manage_options')) {
 | |
|             // Show access denied message instead of redirect to prevent loops
 | |
|             ?>
 | |
|             <div class="hvac-access-denied">
 | |
|                 <h1><?php _e('Access Denied', 'hvac-community-events'); ?></h1>
 | |
|                 <p><?php _e('Sorry, you do not have permission to access the venue management area.', 'hvac-community-events'); ?></p>
 | |
|                 <p><?php _e('If you are an HVAC trainer, please contact an administrator to get the proper role assigned.', 'hvac-community-events'); ?></p>
 | |
|                 <a href="<?php echo esc_url(home_url()); ?>" class="button"><?php _e('Return to Home', 'hvac-community-events'); ?></a>
 | |
|             </div>
 | |
|             <?php
 | |
|             get_footer();
 | |
|             return;
 | |
|         }
 | |
|         ?>
 | |
|         
 | |
|         <div class="hvac-venue-manage-wrapper">
 | |
|             <!-- Venue Management Content -->
 | |
|             <?php
 | |
|             if (class_exists('HVAC_Venues')) {
 | |
|                 echo HVAC_Venues::instance()->render_venue_manage();
 | |
|             } else {
 | |
|                 ?>
 | |
|                 <div class="hvac-error-message">
 | |
|                     <p><?php _e('Venue management system is not available. Please contact an administrator.', 'hvac-community-events'); ?></p>
 | |
|                 </div>
 | |
|                 <?php
 | |
|             }
 | |
|             ?>
 | |
|         </div>
 | |
|     </div>
 | |
| </div>
 | |
| 
 | |
| <?php
 | |
| get_footer();
 |