diff --git a/includes/class-hvac-activator.php b/includes/class-hvac-activator.php index 46ab2cd6..4a44e6ad 100644 --- a/includes/class-hvac-activator.php +++ b/includes/class-hvac-activator.php @@ -261,7 +261,7 @@ class HVAC_Activator { */ private static function set_default_options() { // General settings - add_option('hvac_support_email', 'support@upskillevents.com'); + add_option('hvac_support_email', 'joe@upskillhvac.com'); add_option('hvac_trainer_approval_required', true); add_option('hvac_inactive_days_threshold', 180); diff --git a/includes/class-hvac-page-manager.php b/includes/class-hvac-page-manager.php index 79979f31..864cfade 100644 --- a/includes/class-hvac-page-manager.php +++ b/includes/class-hvac-page-manager.php @@ -454,7 +454,9 @@ class HVAC_Page_Manager { '{logout_url}' => wp_logout_url(home_url()), '{login_url}' => home_url('/training-login/'), '{site_name}' => get_bloginfo('name'), - '{support_email}' => get_option('hvac_support_email', 'support@upskillevents.com') + '{support_email}' => get_option('hvac_support_email', 'joe@upskillhvac.com'), + '{support_email_obfuscated}' => self::obfuscate_email(get_option('hvac_support_email', 'joe@upskillhvac.com')), + '{support_email_encoded}' => self::encode_email(get_option('hvac_support_email', 'joe@upskillhvac.com')) ]; $content = str_replace(array_keys($replacements), array_values($replacements), $content); @@ -573,4 +575,56 @@ class HVAC_Page_Manager { HVAC_Logger::info('Completed page layout and template updates', 'Page Manager'); } + + /** + * Obfuscate email address to prevent bot harvesting + * + * @param string $email Email address to obfuscate + * @return string Obfuscated email HTML + */ + public static function obfuscate_email($email) { + $obfuscated = ''; + $len = strlen($email); + + // Convert each character to HTML entity + for ($i = 0; $i < $len; $i++) { + $char = $email[$i]; + // Mix between decimal and hex entities + if (mt_rand(0, 1)) { + $obfuscated .= '' . ord($char) . ';'; + } else { + $obfuscated .= '' . dechex(ord($char)) . ';'; + } + } + + return $obfuscated; + } + + /** + * Encode email with JavaScript protection + * + * @param string $email Email address to encode + * @return string JavaScript-protected email HTML + */ + public static function encode_email($email) { + $encoded = ''; + $len = strlen($email); + + // Create reversed and encoded email + $reversed = strrev($email); + for ($i = 0; $i < $len; $i++) { + $encoded .= '' . ord($reversed[$i]) . ';'; + } + + // Return JavaScript that decodes and reverses the email + return ' + '; + } } \ No newline at end of file diff --git a/templates/content/registration-pending.html b/templates/content/registration-pending.html new file mode 100644 index 00000000..50bbf536 --- /dev/null +++ b/templates/content/registration-pending.html @@ -0,0 +1,63 @@ + +
✓
+Thank you for registering as an HVAC trainer! Your registration has been submitted and is currently being reviewed by our team.
+ + + +You will receive an email notification once your account has been approved and activated. This process typically takes 1-2 business days.
+ + + +If you have any questions about your registration, please contact our support team at {support_email_encoded}.
+ + + + +Thank you for registering! Your registration is currently pending approval.
You will receive an email notification once your account has been approved.
-If you have any questions, please contact support at .
+If you have any questions, please contact support at .