- 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>
2.7 KiB
2.7 KiB
HVAC Community Events - Transition Guide
Quick Start
To transition to the new architecture:
-
Backup current plugin
cp hvac-community-events.php hvac-community-events.php.backup -
Replace main plugin file
cp hvac-community-events-new.php hvac-community-events.php -
Test the plugin
- Deactivate plugin
- Activate plugin
- Check for any errors
- Verify pages are working
What Changed
Old Architecture
- Single 1000+ line
hvac-community-events.phpfile - All page definitions hardcoded in activation function
- Mixed responsibilities (pages, roles, redirects, etc.)
New Architecture
- Clean 30-line main plugin file
- Modular class-based structure
- Separation of concerns
- Easy to maintain and extend
Key Components
-
Main Plugin File (
hvac-community-events.php)- Only bootstraps the plugin
- Loads the main plugin class
-
Plugin Class (
includes/class-hvac-plugin.php)- Central orchestrator
- Manages all components
- Handles initialization
-
Page Manager (
includes/class-hvac-page-manager.php)- Creates and manages all pages
- Centralized page definitions
- Easy to add/modify pages
-
Template Loader (
includes/class-hvac-template-loader.php)- WordPress-compliant template loading
- Theme override support
- Body class management
-
Content Files (
templates/content/)- Gutenberg block content for status pages
- Easy to edit without touching code
Compatibility
The new architecture maintains 100% backward compatibility:
- All existing functionality preserved
- Legacy redirects still work
- All includes are loaded
- AJAX handlers intact
- Same activation/deactivation behavior
Benefits
- Maintainability: Each file has a single purpose
- Scalability: Easy to add new features
- Testability: Components can be tested independently
- Performance: Only loads what's needed
- Standards: Follows WordPress best practices
Troubleshooting
If you encounter issues:
-
Check PHP error log
tail -f /path/to/error.log -
Verify file permissions
chmod -R 755 hvac-community-events -
Clear cache
- WordPress cache
- Browser cache
- CDN cache (if applicable)
-
Rollback if needed
cp hvac-community-events.php.backup hvac-community-events.php
Next Steps
After successful transition:
- Delete backup file (once confirmed working)
- Update any custom code to use new classes
- Train team on new structure
- Document any customizations
Support
For questions or issues:
- Check
/docs/REFACTORING-GUIDE.md - Review
/docs/CUSTOMIZATION-EXAMPLES.md - Contact development team