Systematic audit and implementation of missing Master Trainer functionality with comprehensive WordPress best practices and security implementation. ## Features Implemented - Master Events Overview (/master-trainer/events/) - KPI dashboard with filtering - Import/Export Data Management (/master-trainer/import-export/) - CSV operations - Communication Templates (/trainer/communication-templates/) - Professional templates - Enhanced Announcements (/master-trainer/announcements/) - Dynamic shortcode integration - Pending Approvals System (/master-trainer/pending-approvals/) - Workflow management ## Navigation & UX Improvements - Removed redundant Events link from top-level navigation menu - Reorganized administrative functions under Tools dropdown - Enhanced navigation clarity and professional appearance - Full responsive design with accessibility compliance ## Architecture & Security - 5 new singleton manager classes following WordPress patterns - Comprehensive role-based access control (hvac_master_trainer) - Complete security implementation (nonces, sanitization, escaping) - Performance optimizations with transient caching and conditional loading - Professional error handling and user feedback systems ## Files Added (16 new files) - 4 manager classes: Import/Export, Events Overview, Pending Approvals, Communication Templates - 4 CSS files with responsive design and accessibility features - 4 JavaScript files with AJAX functionality and error handling - 2 new templates: Import/Export, Pending Approvals - 2 enhanced templates: Events Overview, Communication Templates ## Files Modified (14 files) - Core system integration in Plugin, Page Manager, Scripts/Styles classes - Navigation system cleanup in Master Menu System - Enhanced access control and role management - Template updates for dynamic content integration ## Testing & Deployment - Comprehensive testing with Playwright automation - Successful staging deployment and verification - All 5 missing pages now fully functional - Navigation improvements verified working Resolves master trainer area audit requirements with production-ready implementation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
65 lines
No EOL
1.8 KiB
PHP
65 lines
No EOL
1.8 KiB
PHP
<?php
|
|
/**
|
|
* Template Name: Master Announcements
|
|
* Description: Template for the master trainer announcements page
|
|
*/
|
|
|
|
// Define constant to indicate we are in a page template
|
|
define('HVAC_IN_PAGE_TEMPLATE', true);
|
|
|
|
get_header();
|
|
|
|
// Check master trainer permissions
|
|
$user = wp_get_current_user();
|
|
if (!in_array('hvac_master_trainer', $user->roles) && !current_user_can('manage_options')) {
|
|
wp_die('Access denied. Master trainer privileges required.');
|
|
}
|
|
|
|
// Render master trainer navigation
|
|
if (class_exists('HVAC_Master_Menu_System')) {
|
|
$master_menu = HVAC_Master_Menu_System::instance();
|
|
$master_menu->render_master_menu();
|
|
}
|
|
|
|
// Render breadcrumbs
|
|
if (class_exists('HVAC_Breadcrumbs')) {
|
|
HVAC_Breadcrumbs::render();
|
|
}
|
|
|
|
echo '<div class="hvac-page-wrapper hvac-master-announcements-page">';
|
|
echo '<div class="container">';
|
|
?>
|
|
|
|
<div class="hvac-master-announcements">
|
|
<h1 class="page-title">Announcements</h1>
|
|
|
|
<div class="announcements-intro">
|
|
<p>Manage system-wide announcements for all trainers.</p>
|
|
</div>
|
|
|
|
<div class="announcement-actions">
|
|
<button class="button button-primary hvac-add-announcement">Add New Announcement</button>
|
|
</div>
|
|
|
|
<div class="announcements-list">
|
|
<h2>Current Announcements</h2>
|
|
|
|
<?php
|
|
// Display announcements using the existing shortcode system
|
|
echo do_shortcode('[hvac_announcements_list posts_per_page="20" order="DESC"]');
|
|
?>
|
|
</div>
|
|
|
|
<div class="announcements-history">
|
|
<h2>Announcement History</h2>
|
|
<p>View and manage past announcements that have been archived.</p>
|
|
<button class="button">View History</button>
|
|
</div>
|
|
</div>
|
|
|
|
<?php
|
|
echo '</div>'; // .container
|
|
echo '</div>'; // .hvac-page-wrapper
|
|
|
|
get_footer();
|
|
?>
|