## 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>
68 lines
No EOL
2.2 KiB
PHP
68 lines
No EOL
2.2 KiB
PHP
<?php
|
|
/**
|
|
* Template Name: Master Trainers
|
|
* Description: Template for the master trainer's all trainers management page
|
|
*/
|
|
|
|
// Define constant to indicate we are in a page template
|
|
if (!defined('HVAC_IN_PAGE_TEMPLATE')) {
|
|
define('HVAC_IN_PAGE_TEMPLATE', true);
|
|
}
|
|
|
|
get_header();
|
|
|
|
// Authentication handled by centralized HVAC_Access_Control system
|
|
// Redundant template-level auth check removed to prevent content blocking
|
|
|
|
echo '<div class="hvac-page-wrapper hvac-master-trainers-page">';
|
|
echo '<div class="container">';
|
|
|
|
// Render master trainer navigation inside the wrapper
|
|
if (class_exists('HVAC_Master_Menu_System')) {
|
|
$master_menu = HVAC_Master_Menu_System::instance();
|
|
$master_menu->render_master_menu();
|
|
}
|
|
|
|
// Render breadcrumbs inside the wrapper
|
|
if (class_exists('HVAC_Breadcrumbs')) {
|
|
// Fix: The method is render_breadcrumbs(), not render()
|
|
$breadcrumbs_instance = HVAC_Breadcrumbs::instance();
|
|
echo $breadcrumbs_instance->render_breadcrumbs();
|
|
}
|
|
|
|
// Render the master trainers content
|
|
echo '<h1>All Trainers</h1>';
|
|
echo '<div class="hvac-master-trainers-content">';
|
|
|
|
// First try the_content() to get any shortcode from post_content
|
|
ob_start();
|
|
if (have_posts()) {
|
|
while (have_posts()) {
|
|
the_post();
|
|
the_content();
|
|
}
|
|
}
|
|
$post_content = ob_get_clean();
|
|
|
|
// If post_content is empty or just contains the shortcode without rendering, try direct shortcode
|
|
if (empty(trim(strip_tags($post_content))) || strpos($post_content, '[hvac_master_trainers]') !== false) {
|
|
// Ensure the shortcode class is initialized
|
|
if (class_exists('HVAC_Master_Trainers_Overview')) {
|
|
$instance = HVAC_Master_Trainers_Overview::instance();
|
|
if (method_exists($instance, 'render_trainers_overview')) {
|
|
echo $instance->render_trainers_overview();
|
|
} else {
|
|
echo do_shortcode('[hvac_master_trainers]');
|
|
}
|
|
} else {
|
|
echo '<div class="hvac-notice">Master trainers system is not available. Please contact an administrator.</div>';
|
|
}
|
|
} else {
|
|
echo $post_content;
|
|
}
|
|
|
|
echo '</div>'; // .hvac-master-trainers-content
|
|
echo '</div>'; // .container
|
|
echo '</div>'; // .hvac-page-wrapper
|
|
|
|
get_footer(); |