Changeset 3382425
- Timestamp:
- 10/22/2025 09:04:24 AM (5 months ago)
- Location:
- keyless-auth
- Files:
-
- 65 added
- 7 edited
-
tags/3.0.3 (added)
-
tags/3.0.3/LICENSE (added)
-
tags/3.0.3/assets (added)
-
tags/3.0.3/assets/css (added)
-
tags/3.0.3/assets/css/2fa-frontend.css (added)
-
tags/3.0.3/assets/css/admin-style.css (added)
-
tags/3.0.3/assets/css/forms-enhanced-dark.css (added)
-
tags/3.0.3/assets/css/forms-enhanced-light.css (added)
-
tags/3.0.3/assets/css/forms-enhanced.css (added)
-
tags/3.0.3/assets/css/style-back-end.css (added)
-
tags/3.0.3/assets/css/style-front-end.css (added)
-
tags/3.0.3/assets/js (added)
-
tags/3.0.3/assets/js/2fa-frontend.js (added)
-
tags/3.0.3/assets/js/admin-script.js (added)
-
tags/3.0.3/assets/js/qrcode.js (added)
-
tags/3.0.3/assets/js/qrcode.min.js (added)
-
tags/3.0.3/assets/logo_150_150.png (added)
-
tags/3.0.3/autoload.php (added)
-
tags/3.0.3/includes (added)
-
tags/3.0.3/includes/Admin (added)
-
tags/3.0.3/includes/Admin/Admin.php (added)
-
tags/3.0.3/includes/Admin/Admin.php.backup (added)
-
tags/3.0.3/includes/Admin/Ajax (added)
-
tags/3.0.3/includes/Admin/Ajax/TwoFAAjaxHandler.php (added)
-
tags/3.0.3/includes/Admin/Ajax/index.php (added)
-
tags/3.0.3/includes/Admin/Assets (added)
-
tags/3.0.3/includes/Admin/Assets/AssetLoader.php (added)
-
tags/3.0.3/includes/Admin/Assets/index.php (added)
-
tags/3.0.3/includes/Admin/MenuManager.php (added)
-
tags/3.0.3/includes/Admin/Pages (added)
-
tags/3.0.3/includes/Admin/Pages/DashboardPage.php (added)
-
tags/3.0.3/includes/Admin/Pages/HelpPage.php (added)
-
tags/3.0.3/includes/Admin/Pages/MailLogsPage.php (added)
-
tags/3.0.3/includes/Admin/Pages/OptionsPage.php (added)
-
tags/3.0.3/includes/Admin/Pages/SmtpPage.php (added)
-
tags/3.0.3/includes/Admin/Pages/TemplatesPage.php (added)
-
tags/3.0.3/includes/Admin/Pages/TwoFAUsersPage.php (added)
-
tags/3.0.3/includes/Admin/Pages/index.php (added)
-
tags/3.0.3/includes/Admin/Settings (added)
-
tags/3.0.3/includes/Admin/Settings/SettingsManager.php (added)
-
tags/3.0.3/includes/Admin/Settings/index.php (added)
-
tags/3.0.3/includes/Admin/index.php (added)
-
tags/3.0.3/includes/Core (added)
-
tags/3.0.3/includes/Core/Core.php (added)
-
tags/3.0.3/includes/Core/Database.php (added)
-
tags/3.0.3/includes/Core/Main.php (added)
-
tags/3.0.3/includes/Core/Notices.php (added)
-
tags/3.0.3/includes/Core/index.php (added)
-
tags/3.0.3/includes/Email (added)
-
tags/3.0.3/includes/Email/MailLogger.php (added)
-
tags/3.0.3/includes/Email/SMTP.php (added)
-
tags/3.0.3/includes/Email/Templates.php (added)
-
tags/3.0.3/includes/Email/index.php (added)
-
tags/3.0.3/includes/Security (added)
-
tags/3.0.3/includes/Security/TwoFA (added)
-
tags/3.0.3/includes/Security/TwoFA/Core.php (added)
-
tags/3.0.3/includes/Security/TwoFA/Frontend.php (added)
-
tags/3.0.3/includes/Security/TwoFA/TOTP.php (added)
-
tags/3.0.3/includes/Security/TwoFA/index.php (added)
-
tags/3.0.3/includes/Security/index.php (added)
-
tags/3.0.3/includes/index.php (added)
-
tags/3.0.3/keyless-auth.php (added)
-
tags/3.0.3/languages (added)
-
tags/3.0.3/languages/keyless-auth.pot (added)
-
tags/3.0.3/readme.txt (added)
-
trunk/assets/css/2fa-frontend.css (modified) (2 diffs)
-
trunk/includes/Admin/Pages/HelpPage.php (modified) (1 diff)
-
trunk/includes/Core/Core.php (modified) (2 diffs)
-
trunk/includes/Email/Templates.php (modified) (2 diffs)
-
trunk/includes/Security/TwoFA/Frontend.php (modified) (3 diffs)
-
trunk/keyless-auth.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
keyless-auth/trunk/assets/css/2fa-frontend.css
r3372203 r3382425 276 276 } 277 277 278 /* Active view styles */278 /* Active view - Info grid for Security Status */ 279 279 .chrmrtns-2fa-info-grid { 280 280 display: grid; 281 281 grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 282 gap: 20px;283 margin: 20px 0 ;282 gap: 15px; 283 margin: 20px 0 0 0; 284 284 } 285 285 286 286 .chrmrtns-2fa-info-item { 287 background: var(--kla-background-alt); 288 padding: 15px; 289 border-radius: 5px; 290 text-align: center; 291 } 292 293 .chrmrtns-2fa-info-item h4 { 287 background: var(--kla-background); 288 padding: 20px; 289 border-radius: 8px; 290 text-align: center; 291 border: 1px solid var(--kla-border-light); 292 transition: all 0.2s ease; 293 } 294 295 .chrmrtns-2fa-info-item:hover { 296 border-color: var(--kla-primary); 297 box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1); 298 } 299 300 .chrmrtns-2fa-info-item h5 { 294 301 margin: 0 0 10px 0; 295 302 color: var(--kla-text-light); 296 font-size: 1 4px;303 font-size: 12px; 297 304 text-transform: uppercase; 298 305 letter-spacing: 1px; 306 font-weight: 600; 299 307 } 300 308 … … 306 314 } 307 315 308 /* Actions */ 309 .chrmrtns-2fa-actions { 310 margin-top: 30px; 311 } 312 313 .chrmrtns-2fa-actions > h4 { 314 margin-bottom: 20px; 315 color: var(--kla-text); 316 border-bottom: 1px solid var(--kla-border-light); 317 padding-bottom: 10px; 318 } 319 320 .chrmrtns-2fa-action { 321 margin-bottom: 30px; 322 padding: 20px; 323 background: var(--kla-background-alt); 324 border-radius: 5px; 325 } 326 327 .chrmrtns-2fa-action h5 { 328 margin: 0 0 10px 0; 329 color: var(--kla-text); 330 } 331 332 .chrmrtns-2fa-action p { 333 margin: 10px 0; 316 /* Help text styling */ 317 .chrmrtns-help-text { 334 318 color: var(--kla-text-light); 335 } 336 337 .chrmrtns-2fa-action .button { 338 margin-right: 10px; 339 margin-bottom: 10px; 319 font-style: italic; 320 display: block; 321 margin-top: 10px; 340 322 } 341 323 -
keyless-auth/trunk/includes/Admin/Pages/HelpPage.php
r3380037 r3382425 227 227 <p><strong><?php esc_html_e('Performance Note:', 'keyless-auth'); ?></strong> <?php esc_html_e('CSS files only load when shortcodes are used on a page, saving bandwidth on pages without login forms.', 'keyless-auth'); ?></p> 228 228 </div> 229 230 <h3><?php esc_html_e('Theme Integration (Advanced)', 'keyless-auth'); ?></h3> 231 <p><?php esc_html_e('For developers and advanced users: integrate Keyless Auth styles with your theme\'s color system using WordPress filter hooks.', 'keyless-auth'); ?></p> 232 233 <p><strong><?php esc_html_e('Why use filters instead of custom CSS?', 'keyless-auth'); ?></strong></p> 234 <ul> 235 <li><?php esc_html_e('No !important needed - proper CSS cascade order', 'keyless-auth'); ?></li> 236 <li><?php esc_html_e('Map plugin variables to your theme\'s existing CSS variables', 'keyless-auth'); ?></li> 237 <li><?php esc_html_e('Automatic dark mode support when using theme variables', 'keyless-auth'); ?></li> 238 <li><?php esc_html_e('Cleaner, more maintainable integration', 'keyless-auth'); ?></li> 239 </ul> 240 241 <h4><?php esc_html_e('Basic Example - Login Forms', 'keyless-auth'); ?></h4> 242 <p><?php esc_html_e('Add this code to your theme\'s functions.php or a custom plugin:', 'keyless-auth'); ?></p> 243 <pre style="background: #f5f5f5; padding: 15px; border-radius: 4px; overflow-x: auto; font-size: 13px;"><code><?php 244 add_filter('chrmrtns_kla_custom_css_variables', function($css) { 245 $customCSS = <<<CSS 246 :root { 247 --kla-primary: var(--my-theme-primary); 248 --kla-background: var(--my-theme-bg); 249 --kla-text: var(--my-theme-text); 250 } 251 CSS; 252 return \$css . "\n" . \$customCSS; 253 });</code></pre> 254 255 <h4><?php esc_html_e('Advanced Example - With Dark Mode', 'keyless-auth'); ?></h4> 256 <pre style="background: #f5f5f5; padding: 15px; border-radius: 4px; overflow-x: auto; font-size: 13px;"><code><?php 257 add_filter('chrmrtns_kla_custom_css_variables', function($css) { 258 $customCSS = <<<CSS 259 /* Light mode */ 260 :root, :root.light-mode { 261 --kla-primary: var(--primary); 262 --kla-success: var(--success); 263 --kla-background: var(--bg-body); 264 } 265 266 /* Dark mode */ 267 :root.dark-mode { 268 --kla-primary: var(--primary); 269 --kla-background: var(--tertiary-5); 270 --kla-text: var(--text); 271 } 272 CSS; 273 return \$css . "\n" . \$customCSS; 274 });</code></pre> 275 276 <h4><?php esc_html_e('2FA Page Integration', 'keyless-auth'); ?></h4> 277 <p><?php esc_html_e('Use a separate filter for the 2FA management page:', 'keyless-auth'); ?></p> 278 <pre style="background: #f5f5f5; padding: 15px; border-radius: 4px; overflow-x: auto; font-size: 13px;"><code><?php 279 add_filter('chrmrtns_kla_2fa_custom_css_variables', function($css) { 280 return \$css . ':root { --kla-primary: var(--my-theme-primary); }'; 281 });</code></pre> 282 283 <h4><?php esc_html_e('Available CSS Variables', 'keyless-auth'); ?></h4> 284 <p><?php esc_html_e('You can override any of these variables:', 'keyless-auth'); ?></p> 285 <ul style="column-count: 2; column-gap: 20px;"> 286 <li><code>--kla-primary</code></li> 287 <li><code>--kla-primary-hover</code></li> 288 <li><code>--kla-primary-active</code></li> 289 <li><code>--kla-primary-light</code></li> 290 <li><code>--kla-success</code></li> 291 <li><code>--kla-success-hover</code></li> 292 <li><code>--kla-error</code></li> 293 <li><code>--kla-error-light</code></li> 294 <li><code>--kla-warning</code></li> 295 <li><code>--kla-warning-light</code></li> 296 <li><code>--kla-text</code></li> 297 <li><code>--kla-text-light</code></li> 298 <li><code>--kla-border</code></li> 299 <li><code>--kla-border-light</code></li> 300 <li><code>--kla-background</code></li> 301 <li><code>--kla-background-alt</code></li> 302 </ul> 229 303 </div> 230 304 -
keyless-auth/trunk/includes/Core/Core.php
r3382345 r3382425 862 862 /** 863 863 * Enqueue frontend scripts 864 * 865 * Loads CSS for login forms when shortcode is rendered. 866 * Provides filter hook for theme integration without !important. 867 * 868 * @since 1.0.0 869 * @since 3.1.0 Added chrmrtns_kla_custom_css_variables filter 864 870 */ 865 871 public function enqueue_frontend_scripts() { … … 898 904 'all' 899 905 ); 906 907 /** 908 * Filter: chrmrtns_kla_custom_css_variables 909 * 910 * Allows themes and plugins to customize CSS variables without using !important. 911 * The filtered CSS is added as inline styles after the main stylesheet, 912 * ensuring proper cascade order. 913 * 914 * @since 3.1.0 915 * 916 * @param string $css Custom CSS to append after plugin styles (default: empty string) 917 * 918 * @example Theme integration without !important 919 * add_filter('chrmrtns_kla_custom_css_variables', function($css) { 920 * return $css . ' 921 * :root { 922 * --kla-primary: var(--my-theme-primary); 923 * --kla-background: var(--my-theme-bg); 924 * --kla-text: var(--my-theme-text); 925 * } 926 * '; 927 * }); 928 * 929 * @example Dark mode theme integration 930 * add_filter('chrmrtns_kla_custom_css_variables', function($css) { 931 * return $css . ' 932 * :root.cf-theme-light { 933 * --kla-primary: var(--primary); 934 * } 935 * :root.cf-theme-dark { 936 * --kla-primary: var(--primary); 937 * --kla-background: var(--tertiary-5); 938 * } 939 * '; 940 * }); 941 */ 942 $custom_css = apply_filters('chrmrtns_kla_custom_css_variables', ''); 943 if (!empty($custom_css)) { 944 wp_add_inline_style('chrmrtns_kla_forms_enhanced', $custom_css); 945 } 900 946 } 901 947 } -
keyless-auth/trunk/includes/Email/Templates.php
r3380037 r3382425 24 24 // Constructor is intentionally empty - methods are called as needed 25 25 } 26 26 27 /** 28 * Save template settings 29 * 30 * Note: Nonce verification is performed in render_settings_page() before calling this method 31 */ 32 public function save_template_settings() { 33 // Check if reset_custom_template is set 34 // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in render_settings_page() before calling this method 35 if (isset($_POST['reset_custom_template'])) { 36 delete_option('chrmrtns_kla_custom_email_styles'); 37 delete_option('chrmrtns_kla_custom_email_html'); 38 update_option('chrmrtns_kla_email_template', 'default'); 39 add_settings_error('chrmrtns_kla_settings', 'settings_updated', esc_html__('Custom template has been reset successfully.', 'keyless-auth'), 'updated'); 40 return; 41 } 42 43 // Save template selection 44 // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in render_settings_page() before calling this method 45 if (isset($_POST['chrmrtns_kla_email_template'])) { 46 // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in render_settings_page() before calling this method 47 $template = sanitize_text_field(wp_unslash($_POST['chrmrtns_kla_email_template'])); 48 update_option('chrmrtns_kla_email_template', $template); 49 } 50 51 // Save color settings 52 $color_fields = array( 53 'chrmrtns_kla_button_color', 54 'chrmrtns_kla_button_hover_color', 55 'chrmrtns_kla_button_text_color', 56 'chrmrtns_kla_button_hover_text_color', 57 'chrmrtns_kla_link_color', 58 'chrmrtns_kla_link_hover_color' 59 ); 60 61 foreach ($color_fields as $field) { 62 // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in render_settings_page() before calling this method 63 if (isset($_POST[$field])) { 64 // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in render_settings_page() before calling this method 65 $color = sanitize_text_field(wp_unslash($_POST[$field])); 66 update_option($field, $color); 67 } 68 } 69 70 // Save custom email styles 71 // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in render_settings_page() before calling this method 72 if (isset($_POST['chrmrtns_kla_custom_email_styles'])) { 73 // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in render_settings_page() before calling this method 74 $custom_styles = wp_kses_post(wp_unslash($_POST['chrmrtns_kla_custom_email_styles'])); 75 update_option('chrmrtns_kla_custom_email_styles', $custom_styles); 76 } 77 78 // Save custom email HTML if present 79 // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in render_settings_page() before calling this method 80 if (isset($_POST['chrmrtns_kla_custom_email_html'])) { 81 // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in render_settings_page() before calling this method 82 $custom_html = wp_kses_post(wp_unslash($_POST['chrmrtns_kla_custom_email_html'])); 83 update_option('chrmrtns_kla_custom_email_html', $custom_html); 84 } 85 86 add_settings_error('chrmrtns_kla_settings', 'settings_updated', esc_html__('Settings saved successfully.', 'keyless-auth'), 'updated'); 87 } 88 27 89 /** 28 90 * Get email template content … … 326 388 */ 327 389 public function render_settings_page() { 328 329 // Handle form submission directly here390 391 // Handle form submission 330 392 if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['chrmrtns_kla_settings_nonce'])) { 331 393 if (wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['chrmrtns_kla_settings_nonce'])), 'chrmrtns_kla_settings_save')) { 332 // Call the admin class save_settings method directly 333 if (class_exists('Chrmrtns\\KeylessAuth\\Admin\\Admin')) { 334 $admin = new Admin(); 335 $admin->save_settings(); 336 } 394 $this->save_template_settings(); 337 395 } else { 338 396 add_settings_error('chrmrtns_kla_settings', 'nonce_failed', esc_html__('Security check failed. Please try again.', 'keyless-auth'), 'error'); -
keyless-auth/trunk/includes/Security/TwoFA/Frontend.php
r3380037 r3382425 78 78 * Enqueue frontend scripts and styles 79 79 * Called when [keyless-auth-2fa] shortcode is rendered 80 * 81 * @since 2.4.0 82 * @since 3.1.0 Added chrmrtns_kla_2fa_custom_css_variables filter 80 83 */ 81 84 public function enqueue_frontend_scripts() { … … 128 131 CHRMRTNS_KLA_VERSION 129 132 ); 133 134 /** 135 * Filter: chrmrtns_kla_2fa_custom_css_variables 136 * 137 * Allows themes and plugins to customize 2FA page CSS variables without using !important. 138 * The filtered CSS is added as inline styles after the main stylesheet, 139 * ensuring proper cascade order. 140 * 141 * @since 3.1.0 142 * 143 * @param string $css Custom CSS to append after 2FA plugin styles (default: empty string) 144 * 145 * @example Theme integration for 2FA page 146 * add_filter('chrmrtns_kla_2fa_custom_css_variables', function($css) { 147 * return $css . ' 148 * :root { 149 * --kla-primary: var(--my-theme-primary); 150 * --kla-background: var(--my-theme-bg); 151 * } 152 * '; 153 * }); 154 */ 155 $custom_2fa_css = apply_filters('chrmrtns_kla_2fa_custom_css_variables', ''); 156 if (!empty($custom_2fa_css)) { 157 wp_add_inline_style('chrmrtns-kla-2fa-frontend', $custom_2fa_css); 158 } 130 159 } 131 160 … … 300 329 </div> 301 330 302 <div class="chrmrtns-2fa-info-grid"> 303 <div class="chrmrtns-2fa-info-item"> 304 <h4><?php esc_html_e('Last Used', 'keyless-auth'); ?></h4> 305 <p><?php echo esc_html($last_used); ?></p> 331 <div class="chrmrtns-2fa-step"> 332 <h4>🔐 <?php esc_html_e('Security Status', 'keyless-auth'); ?></h4> 333 <div class="chrmrtns-2fa-info-grid"> 334 <div class="chrmrtns-2fa-info-item"> 335 <h5><?php esc_html_e('Last Used', 'keyless-auth'); ?></h5> 336 <p><?php echo esc_html($last_used); ?></p> 337 </div> 338 <div class="chrmrtns-2fa-info-item"> 339 <h5><?php esc_html_e('Backup Codes', 'keyless-auth'); ?></h5> 340 <p><?php 341 /* translators: %d: number of backup codes remaining */ 342 printf(esc_html(_n('%d code remaining', '%d codes remaining', $backup_count, 'keyless-auth')), (int) $backup_count); ?></p> 343 </div> 344 <div class="chrmrtns-2fa-info-item"> 345 <h5><?php esc_html_e('Account', 'keyless-auth'); ?></h5> 346 <p><?php echo esc_html($user->user_email); ?></p> 347 </div> 306 348 </div> 307 <div class="chrmrtns-2fa-info-item"> 308 <h4><?php esc_html_e('Backup Codes', 'keyless-auth'); ?></h4> 309 <p><?php 310 /* translators: %d: number of backup codes remaining */ 311 printf(esc_html(_n('%d code remaining', '%d codes remaining', $backup_count, 'keyless-auth')), (int) $backup_count); ?></p> 312 </div> 313 </div> 314 315 <div class="chrmrtns-2fa-actions"> 316 <h4><?php esc_html_e('Manage 2FA', 'keyless-auth'); ?></h4> 317 318 <div class="chrmrtns-2fa-action"> 319 <h5><?php esc_html_e('Backup Codes', 'keyless-auth'); ?></h5> 320 <p><?php esc_html_e('Use these codes if you lose access to your authenticator app. Each code can only be used once.', 'keyless-auth'); ?></p> 321 322 <?php if ($backup_count > 0): ?> 323 <div class="chrmrtns-2fa-backup-codes" id="chrmrtns-backup-codes" style="display: none;"> 324 <h6><?php esc_html_e('Your Backup Codes:', 'keyless-auth'); ?></h6> 325 <div class="chrmrtns-backup-codes-list"> 326 <?php 327 // For display, we need to show the original codes, but we only have hashes 328 // This is a limitation - backup codes should be shown immediately after generation 329 ?> 330 <p><em><?php esc_html_e('Backup codes are only shown once when first generated for security.', 'keyless-auth'); ?></em></p> 331 </div> 349 </div> 350 351 <div class="chrmrtns-2fa-step"> 352 <h4>🔑 <?php esc_html_e('Backup Codes', 'keyless-auth'); ?></h4> 353 <p><?php esc_html_e('Use these codes if you lose access to your authenticator app. Each code can only be used once.', 'keyless-auth'); ?></p> 354 355 <?php if ($backup_count > 0): ?> 356 <div class="chrmrtns-2fa-backup-codes" id="chrmrtns-backup-codes" style="display: none;"> 357 <h6><?php esc_html_e('Your Backup Codes:', 'keyless-auth'); ?></h6> 358 <div class="chrmrtns-backup-codes-list"> 359 <p><em><?php esc_html_e('Backup codes are only shown once when first generated for security.', 'keyless-auth'); ?></em></p> 332 360 </div> 333 <button type="button" class="chrmrtns-kla-btn chrmrtns-kla-btn-secondary" id="chrmrtns-show-backup-codes"> 334 <?php esc_html_e('View Backup Codes', 'keyless-auth'); ?> 335 </button> 336 <?php endif; ?> 337 338 <button type="button" class="chrmrtns-kla-btn chrmrtns-kla-btn-primary" id="chrmrtns-generate-backup-codes"> 339 <?php $backup_count > 0 ? esc_html_e('Generate New Backup Codes', 'keyless-auth') : esc_html_e('Generate Backup Codes', 'keyless-auth'); ?> 361 </div> 362 <button type="button" class="chrmrtns-kla-btn chrmrtns-kla-btn-secondary chrmrtns-kla-btn-small" id="chrmrtns-show-backup-codes"> 363 <?php esc_html_e('View Backup Codes', 'keyless-auth'); ?> 340 364 </button> 341 342 <?php if ($backup_count > 0): ?> 343 <p><small><?php esc_html_e('Generating new codes will invalidate all existing backup codes.', 'keyless-auth'); ?></small></p> 344 <?php endif; ?> 345 </div> 346 347 <div class="chrmrtns-2fa-action"> 348 <h5><?php esc_html_e('Disable 2FA', 'keyless-auth'); ?></h5> 349 <?php if ($role_required): ?> 365 <?php endif; ?> 366 367 <button type="button" class="chrmrtns-kla-btn chrmrtns-kla-btn-primary" id="chrmrtns-generate-backup-codes"> 368 <?php $backup_count > 0 ? esc_html_e('Generate New Backup Codes', 'keyless-auth') : esc_html_e('Generate Backup Codes', 'keyless-auth'); ?> 369 </button> 370 371 <?php if ($backup_count > 0): ?> 372 <p><small class="chrmrtns-help-text"><?php esc_html_e('⚠️ Generating new codes will invalidate all existing backup codes.', 'keyless-auth'); ?></small></p> 373 <?php endif; ?> 374 </div> 375 376 <div class="chrmrtns-2fa-step"> 377 <h4><?php echo $role_required ? '🔒' : '⚙️'; ?> <?php esc_html_e('Disable 2FA', 'keyless-auth'); ?></h4> 378 <?php if ($role_required): ?> 379 <div class="chrmrtns-2fa-required-notice" style="margin: 15px 0;"> 350 380 <p><strong><?php esc_html_e('2FA is required for your account role and cannot be disabled.', 'keyless-auth'); ?></strong></p> 351 381 <p><em><?php esc_html_e('Contact your site administrator if you need to disable 2FA.', 'keyless-auth'); ?></em></p> 352 <?php else: ?> 353 <p><?php esc_html_e('Disabling 2FA will make your account less secure. Only disable if absolutely necessary.', 'keyless-auth'); ?></p> 354 <button type="button" class="chrmrtns-kla-btn chrmrtns-kla-btn-danger" id="chrmrtns-disable-2fa"> 355 <?php esc_html_e('Disable 2FA', 'keyless-auth'); ?> 356 </button> 357 <?php endif; ?> 358 </div> 382 </div> 383 <?php else: ?> 384 <p><?php esc_html_e('Disabling 2FA will make your account less secure. Only disable if absolutely necessary.', 'keyless-auth'); ?></p> 385 <button type="button" class="chrmrtns-kla-btn chrmrtns-kla-btn-danger" id="chrmrtns-disable-2fa"> 386 <?php esc_html_e('Disable 2FA', 'keyless-auth'); ?> 387 </button> 388 <?php endif; ?> 389 </div> 390 391 <div class="chrmrtns-2fa-info"> 392 <h4>💡 <?php esc_html_e('About Two-Factor Authentication', 'keyless-auth'); ?></h4> 393 <p><?php esc_html_e('Two-factor authentication adds an extra layer of security by requiring both your password and a time-based code from your authenticator app. This protects your account even if your password is compromised.', 'keyless-auth'); ?></p> 394 <p><strong><?php esc_html_e('Keep your backup codes safe!', 'keyless-auth'); ?></strong> <?php esc_html_e('Store them in a secure location like a password manager. You\'ll need them if you lose access to your authenticator app.', 'keyless-auth'); ?></p> 359 395 </div> 360 396 <?php -
keyless-auth/trunk/keyless-auth.php
r3382345 r3382425 4 4 * Plugin URI: https://github.com/chrmrtns/keyless-auth 5 5 * Description: Enhanced passwordless authentication allowing users to login securely without passwords via email magic links. Fork of Passwordless Login by Cozmoslabs with additional security features. 6 * Version: 3.0. 26 * Version: 3.0.3 7 7 * Author: Chris Martens 8 8 * Author URI: https://github.com/chrmrtns … … 38 38 39 39 // Define plugin constants 40 define('CHRMRTNS_KLA_VERSION', '3.0. 2');40 define('CHRMRTNS_KLA_VERSION', '3.0.3'); 41 41 define('CHRMRTNS_KLA_PLUGIN_DIR', plugin_dir_path(__FILE__)); 42 42 define('CHRMRTNS_KLA_PLUGIN_URL', plugin_dir_url(__FILE__)); -
keyless-auth/trunk/readme.txt
r3382345 r3382425 6 6 Requires at least: 3.9 7 7 Tested up to: 6.8 8 Stable tag: 3.0. 28 Stable tag: 3.0.3 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 305 305 306 306 == Changelog == 307 308 = 3.0.3 = 309 * NEW: CSS variable customization hooks - chrmrtns_kla_custom_css_variables and chrmrtns_kla_2fa_custom_css_variables filters 310 * NEW: Theme integration system - Map plugin CSS variables to your theme's color system without !important 311 * NEW: Comprehensive theme integration documentation in Help page with code examples 312 * IMPROVEMENT: Enhanced 2FA active page styling - Proper boxed containers matching setup page design 313 * IMPROVEMENT: Better CSS cascade order using wp_add_inline_style() for clean theme customization 314 * FIX: Email template settings save - Added proper PHPCS ignore comments for nonce verification (verified in parent method) 315 * DEVELOPER: Filter hooks allow programmatic CSS variable overrides for automatic theme matching 316 * DEVELOPER: Supports dark mode integration via filter hooks with theme-specific CSS variable mapping 317 * DOCUMENTATION: Added "Theme Integration (Advanced)" section to Help page with basic and advanced examples 307 318 308 319 = 3.0.2 =
Note: See TracChangeset
for help on using the changeset viewer.