- Added template loading for master-trainer/communication-templates in class-hvac-community-events.php
- Created page-master-communication-templates.php template with proper auth and navigation
- Fixed URL redirect issue preventing access to master trainer communication templates
- All master trainer pages now accessible without redirects
- Completed comprehensive master trainer dashboard fixes
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
39 lines
No EOL
1 KiB
PHP
39 lines
No EOL
1 KiB
PHP
<?php
|
|
/**
|
|
* Template Name: Master Communication Templates
|
|
* Description: Template for master trainer communication templates 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-communication-templates-page">';
|
|
echo '<div class="container">';
|
|
|
|
// Render the communication templates content
|
|
echo do_shortcode('[hvac_communication_templates]');
|
|
|
|
echo '</div>'; // .container
|
|
echo '</div>'; // .hvac-page-wrapper
|
|
|
|
get_footer();
|
|
?>
|