- Implement singleton pattern for HVAC_Enhanced_Settings to prevent duplicate initialization - Fix jQuery selector error by checking for valid hash selectors before using $(href) - Add default email templates with professional copy for trainer notifications - Update plugin version to 1.0.1 for cache busting - Remove duplicate Enhanced Settings initialization from HVAC_Community_Events - Add force cache refresh suffix to admin scripts This resolves the duplicate content issue on email templates page and fixes JavaScript errors in the admin interface. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
		
			
				
	
	
		
			41 lines
		
	
	
		
			No EOL
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			No EOL
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
| #!/bin/bash
 | |
| 
 | |
| # Fix undefined HVAC_CE_PLUGIN_DIR constant in all PHP files
 | |
| echo "Fixing undefined HVAC_CE_PLUGIN_DIR constant..."
 | |
| 
 | |
| # List of files to fix
 | |
| files=(
 | |
|     "includes/class-hvac-registration.php"
 | |
|     "includes/class-hvac-settings.php"
 | |
|     "templates/template-hvac-master-dashboard.php"
 | |
|     "includes/class-hvac-master-dashboard-data.php"
 | |
|     "includes/class-hvac-approval-workflow.php"
 | |
|     "templates/page-community-login.php"
 | |
|     "includes/class-hvac-manage-event.php"
 | |
|     "templates/template-trainer-profile.php"
 | |
|     "templates/template-hvac-dashboard.php"
 | |
|     "includes/class-attendee-profile.php"
 | |
|     "includes/class-hvac-dashboard.php"
 | |
| )
 | |
| 
 | |
| # Replace HVAC_CE_PLUGIN_DIR with HVAC_PLUGIN_DIR in each file
 | |
| for file in "${files[@]}"; do
 | |
|     if [ -f "$file" ]; then
 | |
|         echo "Fixing $file..."
 | |
|         sed -i.bak 's/HVAC_CE_PLUGIN_DIR/HVAC_PLUGIN_DIR/g' "$file"
 | |
|         # Remove backup file
 | |
|         rm -f "$file.bak"
 | |
|     else
 | |
|         echo "Warning: $file not found"
 | |
|     fi
 | |
| done
 | |
| 
 | |
| # Also check certificate files
 | |
| echo "Checking certificate files..."
 | |
| find includes/certificates -name "*.php" -type f -exec grep -l "HVAC_CE_PLUGIN_DIR" {} \; | while read file; do
 | |
|     echo "Fixing $file..."
 | |
|     sed -i.bak 's/HVAC_CE_PLUGIN_DIR/HVAC_PLUGIN_DIR/g' "$file"
 | |
|     rm -f "$file.bak"
 | |
| done
 | |
| 
 | |
| echo "Done! All occurrences of HVAC_CE_PLUGIN_DIR have been replaced with HVAC_PLUGIN_DIR" |