Changeset 3372303
- Timestamp:
- 10/03/2025 11:02:48 AM (5 months ago)
- Location:
- keyless-auth
- Files:
-
- 31 added
- 6 edited
-
tags/2.6.2 (added)
-
tags/2.6.2/LICENSE (added)
-
tags/2.6.2/assets (added)
-
tags/2.6.2/assets/css (added)
-
tags/2.6.2/assets/css/2fa-frontend.css (added)
-
tags/2.6.2/assets/css/admin-style.css (added)
-
tags/2.6.2/assets/css/forms-enhanced.css (added)
-
tags/2.6.2/assets/css/style-back-end.css (added)
-
tags/2.6.2/assets/css/style-front-end.css (added)
-
tags/2.6.2/assets/js (added)
-
tags/2.6.2/assets/js/2fa-frontend.js (added)
-
tags/2.6.2/assets/js/admin-script.js (added)
-
tags/2.6.2/assets/js/qrcode.js (added)
-
tags/2.6.2/assets/js/qrcode.min.js (added)
-
tags/2.6.2/assets/logo_150_150.png (added)
-
tags/2.6.2/inc (added)
-
tags/2.6.2/inc/chrmrtns.class.notices.php (added)
-
tags/2.6.2/includes (added)
-
tags/2.6.2/includes/class-chrmrtns-kla-2fa-core.php (added)
-
tags/2.6.2/includes/class-chrmrtns-kla-2fa-frontend.php (added)
-
tags/2.6.2/includes/class-chrmrtns-kla-admin.php (added)
-
tags/2.6.2/includes/class-chrmrtns-kla-core.php (added)
-
tags/2.6.2/includes/class-chrmrtns-kla-database.php (added)
-
tags/2.6.2/includes/class-chrmrtns-kla-email-templates.php (added)
-
tags/2.6.2/includes/class-chrmrtns-kla-mail-logger.php (added)
-
tags/2.6.2/includes/class-chrmrtns-kla-smtp.php (added)
-
tags/2.6.2/includes/class-chrmrtns-kla-totp.php (added)
-
tags/2.6.2/keyless-auth.php (added)
-
tags/2.6.2/languages (added)
-
tags/2.6.2/languages/keyless-auth.pot (added)
-
tags/2.6.2/readme.txt (added)
-
trunk/assets/css/forms-enhanced.css (modified) (6 diffs)
-
trunk/assets/css/style-front-end.css (modified) (2 diffs)
-
trunk/includes/class-chrmrtns-kla-admin.php (modified) (2 diffs)
-
trunk/includes/class-chrmrtns-kla-core.php (modified) (5 diffs)
-
trunk/keyless-auth.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
keyless-auth/trunk/assets/css/forms-enhanced.css
r3372203 r3372303 20 20 --kla-success: #46b450; 21 21 --kla-success-hover: #2e7d32; 22 --kla-success-text: #155724; 22 23 --kla-error: #d63638; 23 24 --kla-error-light: #f8d7da; 25 --kla-error-text: #721c24; 24 26 --kla-warning: #dba617; 25 27 --kla-warning-light: #fff3cd; 28 --kla-warning-text: #856404; 26 29 --kla-text: #2c3338; 27 30 --kla-text-light: #646970; … … 40 43 :root { 41 44 --kla-primary-light: #1a3a4a; 45 --kla-success-text: #155724; 46 --kla-error-text: #721c24; 47 --kla-warning-text: #856404; 42 48 --kla-background: #1e1e1e; 43 49 --kla-background-alt: #2c3338; … … 59 65 :root[data-mode="dark"] { 60 66 --kla-primary-light: #1a3a4a; 67 --kla-success-text: #155724; 68 --kla-error-text: #721c24; 69 --kla-warning-text: #856404; 61 70 --kla-background: #1e1e1e; 62 71 --kla-background-alt: #2c3338; … … 327 336 328 337 .chrmrtns-kla-form-wrapper .chrmrtns-error { 329 color: #721c24;338 color: var(--kla-error-text); 330 339 background-color: var(--kla-error-light); 331 340 border: 1px solid var(--kla-error); … … 333 342 334 343 .chrmrtns-kla-form-wrapper .chrmrtns-success { 335 color: #155724;344 color: var(--kla-success-text); 336 345 background-color: #d4edda; 337 346 border: 1px solid var(--kla-success); … … 339 348 340 349 .chrmrtns-kla-form-wrapper .chrmrtns-alert { 341 color: #856404;350 color: var(--kla-warning-text); 342 351 background-color: var(--kla-warning-light); 343 352 border: 1px solid var(--kla-warning); -
keyless-auth/trunk/assets/css/style-front-end.css
r3367966 r3372303 4 4 display: block; 5 5 width: 100%; 6 max-width: 400px; 6 7 -moz-box-sizing: border-box; 7 8 -webkit-box-sizing: border-box; … … 9 10 } 10 11 .chrmrtns-error{ 11 background: #ffebe8; 12 border: 1px solid #C00; 12 background: var(--kla-error-light, #ffebe8); 13 border: 1px solid var(--kla-error, #C00); 14 color: var(--kla-error-text, #721c24); 13 15 } 14 16 .chrmrtns-success{ 15 background: #e7f7d3; 16 border: 1px solid #6c3; 17 background: #d4edda; 18 border: 1px solid var(--kla-success, #6c3); 19 color: var(--kla-success-text, #155724); 17 20 } 18 21 .chrmrtns-alert{ 19 background: #fffbbc; 20 border: 1px solid #E6DB55; 22 background: var(--kla-warning-light, #fffbbc); 23 border: 1px solid var(--kla-warning, #E6DB55); 24 color: var(--kla-warning-text, #856404); 21 25 } 22 26 /* Last paragraph, no bottom margin */ -
keyless-auth/trunk/includes/class-chrmrtns-kla-admin.php
r3369805 r3372303 1086 1086 <tr> 1087 1087 <td><code>[keyless-auth]</code></td> 1088 <td><?php esc_html_e('Main passwordless login form (magic link only). Supports redirect attribute.', 'keyless-auth'); ?></td>1088 <td><?php esc_html_e('Main passwordless login form (magic link only). Supports attributes: redirect, button_text, description, label', 'keyless-auth'); ?></td> 1089 1089 </tr> 1090 1090 <tr> … … 1111 1111 <h4><?php esc_html_e('[keyless-auth] Options:', 'keyless-auth'); ?></h4> 1112 1112 <p><code>[keyless-auth redirect="/dashboard/"]</code><br><?php esc_html_e('Redirect to dashboard after magic link login', 'keyless-auth'); ?></p> 1113 <p><code>[keyless-auth button_text="Email login link"]</code><br><?php esc_html_e('Custom button text', 'keyless-auth'); ?></p> 1114 <p><code>[keyless-auth label="Your Email"]</code><br><?php esc_html_e('Custom field label', 'keyless-auth'); ?></p> 1115 <p><code>[keyless-auth description="Secure passwordless access"]</code><br><?php esc_html_e('Add description text above the form', 'keyless-auth'); ?></p> 1116 <p><code>[keyless-auth button_text="Email login link" description="Secure passwordless access" label="Your Email" redirect="/dashboard/"]</code><br><?php esc_html_e('Combined options example', 'keyless-auth'); ?></p> 1113 1117 1114 1118 <h4><?php esc_html_e('Advanced [keyless-auth-full] Options:', 'keyless-auth'); ?></h4> -
keyless-auth/trunk/includes/class-chrmrtns-kla-core.php
r3372203 r3372303 60 60 // Parse attributes with defaults 61 61 $atts = shortcode_atts(array( 62 'redirect' => '' 62 'redirect' => '', 63 'button_text' => '', 64 'description' => '', 65 'label' => '' 63 66 ), $atts, 'keyless-auth'); 64 67 ob_start(); … … 118 121 } 119 122 } 120 123 124 // Determine label text 125 $label_text = !empty($atts['label']) ? $atts['label'] : $login_label; 126 127 // Determine button text 128 $button_text = !empty($atts['button_text']) ? $atts['button_text'] : __('Send me the link', 'keyless-auth'); 129 121 130 ?> 122 131 <div class="chrmrtns-kla-form-wrapper"> 132 <?php if (!empty($atts['description'])): ?> 133 <p class="chrmrtns-kla-description"><?php echo wp_kses_post($atts['description']); ?></p> 134 <?php endif; ?> 123 135 <form method="post" class="chrmrtns-form"> 124 136 <p> 125 <label for="user_email_username"><?php echo esc_html(apply_filters('chrmrtns_kla_change_form_label', $l ogin_label)); ?></label><br>137 <label for="user_email_username"><?php echo esc_html(apply_filters('chrmrtns_kla_change_form_label', $label_text)); ?></label><br> 126 138 <input type="text" name="user_email_username" id="user_email_username" class="input" value="" size="20" required /> 127 139 </p> … … 132 144 <?php endif; ?> 133 145 <p class="submit"> 134 <input type="submit" name="wp-submit" id="chrmrtns-submit" class="button-primary" value="<?php e sc_html_e('Send me the link', 'keyless-auth'); ?>" />146 <input type="submit" name="wp-submit" id="chrmrtns-submit" class="button-primary" value="<?php echo esc_attr($button_text); ?>" /> 135 147 </p> 136 148 </form> … … 729 741 // Enqueue legacy styles for backward compatibility 730 742 if (file_exists(CHRMRTNS_KLA_PLUGIN_DIR . '/assets/css/style-front-end.css')) { 731 wp_register_style('chrmrtns_frontend_stylesheet', CHRMRTNS_KLA_PLUGIN_URL . 'assets/css/style-front-end.css', array(), CHRMRTNS_KLA_VERSION );743 wp_register_style('chrmrtns_frontend_stylesheet', CHRMRTNS_KLA_PLUGIN_URL . 'assets/css/style-front-end.css', array(), CHRMRTNS_KLA_VERSION . '.1'); 732 744 wp_enqueue_style('chrmrtns_frontend_stylesheet'); 733 745 } … … 739 751 CHRMRTNS_KLA_PLUGIN_URL . 'assets/css/forms-enhanced.css', 740 752 array('chrmrtns_frontend_stylesheet'), // Load after the base stylesheet 741 CHRMRTNS_KLA_VERSION . '. 4', // Added .4 to force cache bust for --kla-primary-light dark mode fix753 CHRMRTNS_KLA_VERSION . '.1', // Added .1 to force cache bust for message box colors and dark mode 742 754 'all' 743 755 ); -
keyless-auth/trunk/keyless-auth.php
r3372203 r3372303 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: 2.6. 16 * Version: 2.6.2 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', '2.6. 1');40 define('CHRMRTNS_KLA_VERSION', '2.6.2'); 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
r3372276 r3372303 6 6 Requires at least: 3.9 7 7 Tested up to: 6.8 8 Stable tag: 2.6. 18 Stable tag: 2.6.2 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 128 128 Store SMTP credentials securely in wp-config.php: 129 129 130 `define('CHRMRTNS_ PA_SMTP_USERNAME', 'your-email@example.com');`131 `define('CHRMRTNS_ PA_SMTP_PASSWORD', 'your-smtp-password');`130 `define('CHRMRTNS_KLA_SMTP_USERNAME', 'your-email@example.com');` 131 `define('CHRMRTNS_KLA_SMTP_PASSWORD', 'your-smtp-password');` 132 132 133 133 = WordPress Integration = … … 221 221 Yes! Version 2.0.4 introduces secure credential storage options. You can choose to store SMTP username and password in wp-config.php instead of the database. This is more secure as wp-config.php is typically outside the web root. Simply add these constants to your wp-config.php: 222 222 223 `define('CHRMRTNS_ KLA_SMTP_USERNAME', 'your-email@example.com');`224 `define('CHRMRTNS_ KLA_SMTP_PASSWORD', 'your-smtp-password');`223 `define('CHRMRTNS_PA_SMTP_USERNAME', 'your-email@example.com');` 224 `define('CHRMRTNS_PA_SMTP_PASSWORD', 'your-smtp-password');` 225 225 226 226 Then select "Store in wp-config.php" in the SMTP settings. … … 271 271 272 272 == Changelog == 273 = 2.6.2 = 274 * FIX: Replaced hardcoded colors in style-front-end.css with CSS variables for proper dark mode support 275 * FIX: Added max-width (400px) to .chrmrtns-box for consistent message box width matching form width 276 * NEW: Added shortcode customization parameters to [keyless-auth]: button_text, description, label 277 * IMPROVEMENT: Alert/success/error boxes now support dark mode and can be customized via CSS variables 278 * ENHANCEMENT: Shortcode now allows custom button text, field labels, and description text for better branding 279 273 280 = 2.6.1 = 274 281 * FIX: Dark mode CSS variable inheritance - fixed --kla-primary-light not defined for dark mode causing light backgrounds in 2FA info boxes
Note: See TracChangeset
for help on using the changeset viewer.