- Scoped all CSS rules to .hvac-event-manage-wrapper to prevent theme conflicts - Moved navigation header directly into page template to avoid duplication - Disabled duplicate header hook in HVAC_Event_Manage_Header class - Added theme override styles to enforce 1200px max-width and 20px padding - Updated CSS methodology to use consistent spacing and remove CSS variables - Added HVAC_Page_Content_Fixer class to clean escaped HTML comments - Updated documentation with CSS architecture details - Enhanced theme compatibility with higher specificity selectors The event manage page now displays correctly with: - Single navigation header (no duplicates) - Proper white background and shadows - Consistent button styling matching other pages - Clean 1200px max-width layout with 20px padding 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
67 lines
No EOL
1.8 KiB
PHP
67 lines
No EOL
1.8 KiB
PHP
<?php
|
|
/**
|
|
* HVAC Event Manage Header
|
|
*
|
|
* @package HVACCommunityEvents
|
|
*/
|
|
|
|
if (!defined('ABSPATH')) {
|
|
exit;
|
|
}
|
|
|
|
/**
|
|
* Class to handle event management page header
|
|
*/
|
|
class HVAC_Event_Manage_Header {
|
|
|
|
/**
|
|
* Constructor
|
|
*/
|
|
public function __construct() {
|
|
// Only use the tribe-specific action to avoid duplication
|
|
// Check if we should render the header based on the context
|
|
add_action('init', array($this, 'maybe_add_header_hook'));
|
|
}
|
|
|
|
/**
|
|
* Conditionally add the header hook
|
|
*/
|
|
public function maybe_add_header_hook() {
|
|
// Add header before the event submission page
|
|
// Temporarily disabled to debug duplicate header issue
|
|
// add_action('tribe_events_community_before_event_submission_page', array($this, 'render_header'));
|
|
}
|
|
|
|
|
|
/**
|
|
* Render the header
|
|
*/
|
|
public function render_header() {
|
|
// Always show the navigation header
|
|
echo $this->get_header_html();
|
|
}
|
|
|
|
/**
|
|
* Get the header HTML
|
|
*/
|
|
private function get_header_html() {
|
|
ob_start();
|
|
?>
|
|
<!-- Navigation Header -->
|
|
<div class="hvac-dashboard-header">
|
|
<h1 class="entry-title">Create Event</h1>
|
|
<div class="hvac-dashboard-nav">
|
|
<a href="/trainer/dashboard/" class="ast-button ast-button-secondary">Dashboard</a>
|
|
<a href="/trainer/certificate-reports/" class="ast-button ast-button-secondary">Certificate Reports</a>
|
|
<a href="/trainer/generate-certificates/" class="ast-button ast-button-secondary">Generate Certificates</a>
|
|
<button class="ast-button hvac-help-trigger">Help</button>
|
|
</div>
|
|
</div>
|
|
|
|
<?php
|
|
return ob_get_clean();
|
|
}
|
|
}
|
|
|
|
// Initialize
|
|
new HVAC_Event_Manage_Header();
|