Plugin Directory

Changeset 3372303


Ignore:
Timestamp:
10/03/2025 11:02:48 AM (5 months ago)
Author:
chrmrtns
Message:

Version 2.6.2 - CSS Fixes & Shortcode Enhancements

  • FIX: Replaced hardcoded colors in style-front-end.css with CSS variables for proper dark mode support
  • FIX: Added max-width (400px) to .chrmrtns-box for consistent message box width
  • NEW: Added shortcode customization parameters: button_text, description, label
  • IMPROVEMENT: Alert/success/error boxes now fully support dark mode with dedicated text color variables
  • ENHANCEMENT: Better branding control with customizable shortcode text
  • Added cache busters (.1) to both CSS files to force browser reload
  • Updated help page with new shortcode parameter documentation
Location:
keyless-auth
Files:
31 added
6 edited

Legend:

Unmodified
Added
Removed
  • keyless-auth/trunk/assets/css/forms-enhanced.css

    r3372203 r3372303  
    2020    --kla-success: #46b450;
    2121    --kla-success-hover: #2e7d32;
     22    --kla-success-text: #155724;
    2223    --kla-error: #d63638;
    2324    --kla-error-light: #f8d7da;
     25    --kla-error-text: #721c24;
    2426    --kla-warning: #dba617;
    2527    --kla-warning-light: #fff3cd;
     28    --kla-warning-text: #856404;
    2629    --kla-text: #2c3338;
    2730    --kla-text-light: #646970;
     
    4043    :root {
    4144        --kla-primary-light: #1a3a4a;
     45        --kla-success-text: #155724;
     46        --kla-error-text: #721c24;
     47        --kla-warning-text: #856404;
    4248        --kla-background: #1e1e1e;
    4349        --kla-background-alt: #2c3338;
     
    5965:root[data-mode="dark"] {
    6066    --kla-primary-light: #1a3a4a;
     67    --kla-success-text: #155724;
     68    --kla-error-text: #721c24;
     69    --kla-warning-text: #856404;
    6170    --kla-background: #1e1e1e;
    6271    --kla-background-alt: #2c3338;
     
    327336
    328337.chrmrtns-kla-form-wrapper .chrmrtns-error {
    329     color: #721c24;
     338    color: var(--kla-error-text);
    330339    background-color: var(--kla-error-light);
    331340    border: 1px solid var(--kla-error);
     
    333342
    334343.chrmrtns-kla-form-wrapper .chrmrtns-success {
    335     color: #155724;
     344    color: var(--kla-success-text);
    336345    background-color: #d4edda;
    337346    border: 1px solid var(--kla-success);
     
    339348
    340349.chrmrtns-kla-form-wrapper .chrmrtns-alert {
    341     color: #856404;
     350    color: var(--kla-warning-text);
    342351    background-color: var(--kla-warning-light);
    343352    border: 1px solid var(--kla-warning);
  • keyless-auth/trunk/assets/css/style-front-end.css

    r3367966 r3372303  
    44    display: block;
    55    width: 100%;
     6    max-width: 400px;
    67    -moz-box-sizing: border-box;
    78    -webkit-box-sizing: border-box;
     
    910}
    1011.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);
    1315}
    1416.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);
    1720}
    1821.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);
    2125}
    2226/* Last paragraph, no bottom margin */
  • keyless-auth/trunk/includes/class-chrmrtns-kla-admin.php

    r3369805 r3372303  
    10861086                        <tr>
    10871087                            <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>
    10891089                        </tr>
    10901090                        <tr>
     
    11111111                <h4><?php esc_html_e('[keyless-auth] Options:', 'keyless-auth'); ?></h4>
    11121112                <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>
    11131117
    11141118                <h4><?php esc_html_e('Advanced [keyless-auth-full] Options:', 'keyless-auth'); ?></h4>
  • keyless-auth/trunk/includes/class-chrmrtns-kla-core.php

    r3372203 r3372303  
    6060        // Parse attributes with defaults
    6161        $atts = shortcode_atts(array(
    62             'redirect' => ''
     62            'redirect' => '',
     63            'button_text' => '',
     64            'description' => '',
     65            'label' => ''
    6366        ), $atts, 'keyless-auth');
    6467        ob_start();
     
    118121            }
    119122        }
    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
    121130        ?>
    122131        <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; ?>
    123135            <form method="post" class="chrmrtns-form">
    124136                <p>
    125                     <label for="user_email_username"><?php echo esc_html(apply_filters('chrmrtns_kla_change_form_label', $login_label)); ?></label><br>
     137                    <label for="user_email_username"><?php echo esc_html(apply_filters('chrmrtns_kla_change_form_label', $label_text)); ?></label><br>
    126138                    <input type="text" name="user_email_username" id="user_email_username" class="input" value="" size="20" required />
    127139                </p>
     
    132144                <?php endif; ?>
    133145                <p class="submit">
    134                     <input type="submit" name="wp-submit" id="chrmrtns-submit" class="button-primary" value="<?php esc_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); ?>" />
    135147                </p>
    136148            </form>
     
    729741        // Enqueue legacy styles for backward compatibility
    730742        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');
    732744            wp_enqueue_style('chrmrtns_frontend_stylesheet');
    733745        }
     
    739751                CHRMRTNS_KLA_PLUGIN_URL . 'assets/css/forms-enhanced.css',
    740752                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 fix
     753                CHRMRTNS_KLA_VERSION . '.1', // Added .1 to force cache bust for message box colors and dark mode
    742754                'all'
    743755            );
  • keyless-auth/trunk/keyless-auth.php

    r3372203 r3372303  
    44* Plugin URI: https://github.com/chrmrtns/keyless-auth
    55* 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.1
     6* Version: 2.6.2
    77* Author: Chris Martens
    88* Author URI: https://github.com/chrmrtns
     
    3838
    3939// Define plugin constants
    40 define('CHRMRTNS_KLA_VERSION', '2.6.1');
     40define('CHRMRTNS_KLA_VERSION', '2.6.2');
    4141define('CHRMRTNS_KLA_PLUGIN_DIR', plugin_dir_path(__FILE__));
    4242define('CHRMRTNS_KLA_PLUGIN_URL', plugin_dir_url(__FILE__));
  • keyless-auth/trunk/readme.txt

    r3372276 r3372303  
    66Requires at least: 3.9
    77Tested up to: 6.8
    8 Stable tag: 2.6.1
     8Stable tag: 2.6.2
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    128128Store SMTP credentials securely in wp-config.php:
    129129
    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');`
    132132
    133133= WordPress Integration =
     
    221221    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:
    222222   
    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');`
    225225   
    226226    Then select "Store in wp-config.php" in the SMTP settings.
     
    271271
    272272== 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
    273280= 2.6.1 =
    274281* 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.