upskill-event-manager/debug-css.php
bengizmo 993a820a84 feat: Add comprehensive development artifacts to repository
- Add 26 documentation files including test reports, deployment guides, and troubleshooting documentation
- Include 3 CSV data files for trainer imports and user registration tracking
- Add 43 JavaScript test files covering mobile optimization, Safari compatibility, and E2E testing
- Include 18 PHP utility files for debugging, geocoding, and data analysis
- Add 12 shell scripts for deployment verification, user management, and database operations
- Update .gitignore with whitelist patterns for development files, documentation, and CSV data

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-11 12:26:11 -03:00

48 lines
No EOL
1.5 KiB
PHP

<?php
// Debug CSS loading on event manage page
// Simulate being on the event manage page
$_SERVER['REQUEST_URI'] = '/trainer/event/manage/';
// Load WordPress
define('WP_USE_THEMES', false);
require_once('../../../wp-load.php');
// Set up the query for the event manage page
$page = get_page_by_path('trainer/event/manage');
if ($page) {
$GLOBALS['wp_query'] = new WP_Query([
'page_id' => $page->ID
]);
$GLOBALS['post'] = $page;
setup_postdata($page);
}
// Initialize scripts and styles
do_action('wp_enqueue_scripts');
// Check what CSS files are enqueued
global $wp_styles;
echo "=== HVAC CSS Files Enqueued ===\n";
foreach ($wp_styles->queue as $handle) {
if (strpos($handle, 'hvac') !== false) {
$style = $wp_styles->registered[$handle];
echo "$handle:\n";
echo " Source: " . $style->src . "\n";
echo " Dependencies: " . implode(', ', $style->deps) . "\n";
echo "\n";
}
}
// Check is_event_manage_page
if (class_exists('HVAC_Scripts_Styles')) {
$scripts = HVAC_Scripts_Styles::instance();
$reflection = new ReflectionClass($scripts);
$method = $reflection->getMethod('is_event_manage_page');
$method->setAccessible(true);
echo "\n=== Page Detection ===\n";
echo "is_event_manage_page(): " . ($method->invoke($scripts) ? 'true' : 'false') . "\n";
echo "Current page ID: " . ($page ? $page->ID : 'none') . "\n";
echo "Page template: " . get_page_template_slug($page->ID) . "\n";
}