array( 'title' => __( 'New Registration Notification', 'hvac-community-events' ), 'description' => __( 'Sent to administrators when a new trainer registers', 'hvac-community-events' ), 'placeholders' => array( '{trainer_name}' => 'Trainer full name', '{trainer_email}' => 'Trainer email address', '{business_name}' => 'Business name', '{business_phone}' => 'Business phone', '{business_email}' => 'Business email', '{registration_date}' => 'Registration date', '{application_details}' => 'Application details', '{approval_url}' => 'Quick approval link', ), ), 'account_approved' => array( 'title' => __( 'Account Approved', 'hvac-community-events' ), 'description' => __( 'Sent to trainers when their account is approved', 'hvac-community-events' ), 'placeholders' => array( '{trainer_name}' => 'Trainer full name', '{trainer_email}' => 'Trainer email address', '{business_name}' => 'Business name', '{dashboard_url}' => 'Dashboard URL', '{login_url}' => 'Login page URL', '{website_name}' => 'Website name', '{website_url}' => 'Website URL', ), ), 'account_disabled' => array( 'title' => __( 'Account Disabled', 'hvac-community-events' ), 'description' => __( 'Sent to trainers when their account is disabled', 'hvac-community-events' ), 'placeholders' => array( '{trainer_name}' => 'Trainer full name', '{trainer_email}' => 'Trainer email address', '{business_name}' => 'Business name', '{support_email}' => 'Support email address', '{website_name}' => 'Website name', ), ), ); ?>

$definition ): ?>

$template ) { if ( isset( $template['subject'] ) ) { $sanitized[$key]['subject'] = sanitize_text_field( $template['subject'] ); } if ( isset( $template['body'] ) ) { $sanitized[$key]['body'] = wp_kses_post( $template['body'] ); } } return $sanitized; } /** * Enqueue admin scripts and styles */ public function enqueue_admin_scripts( $hook ) { // Only load on our settings page if ( strpos( $hook, 'hvac-community-events' ) === false ) { return; } // Add custom CSS wp_add_inline_style( 'wp-admin', ' .hvac-email-templates-settings .email-template-section { background: #fff; border: 1px solid #e5e5e5; padding: 20px; margin-bottom: 20px; } .hvac-email-templates-settings .placeholders-info { background: #f5f5f5; padding: 15px; margin: 15px 0; border-radius: 3px; } .hvac-email-templates-settings .placeholders-list { margin-top: 10px; line-height: 1.8; } .hvac-email-templates-settings .placeholders-list code { background: #fff; padding: 2px 5px; border: 1px solid #ddd; } .hvac-email-templates-settings .email-template-preview { margin-top: 40px; background: #f9f9f9; padding: 20px; border-radius: 3px; } ' ); // Add preview functionality wp_add_inline_script( 'jquery', ' jQuery(document).ready(function($) { // Preview functionality could be added here // For now, just a placeholder }); ' ); } }