Plugin Directory

Changeset 3458190


Ignore:
Timestamp:
02/10/2026 03:49:29 PM (12 days ago)
Author:
a1tools
Message:

Version 1.4.7: Fix hover effects and custom hover colors in Elementor editor preview

Location:
a1-tools/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • a1-tools/trunk/a1-tools.php

    r3458184 r3458190  
    44 * Plugin URI:        https://tools.a-1chimney.com
    55 * Description:       Connects your WordPress site to the A1 Tools platform for centralized management of contact information, social media links, and business details.
    6  * Version:           1.4.6
     6 * Version:           1.4.7
    77 * Requires at least: 5.0
    88 * Requires PHP:      7.4
     
    2121
    2222// Plugin constants.
    23 define( 'A1TOOLS_VERSION', '1.4.6' );
     23define( 'A1TOOLS_VERSION', '1.4.7' );
    2424define( 'A1TOOLS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    2525define( 'A1TOOLS_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
  • a1-tools/trunk/includes/class-a1-tools-elementor-widget.php

    r3458184 r3458190  
    576576        var spacing = settings.spacing.size || 8;
    577577        var alignment = settings.alignment || 'left';
     578        var hoverEffect = settings.hover_effect || 'scale';
    578579
    579580        // Custom style colors
     
    582583        var customBorderColor = settings.custom_border_color || '';
    583584        var customBorderWidth = settings.custom_border_width ? settings.custom_border_width.size : 0;
     585        var customHoverIconColor = settings.custom_hover_icon_color || '';
     586        var customHoverBgColor = settings.custom_hover_bg_color || '';
     587        var customHoverBorderColor = settings.custom_hover_border_color || '';
    584588
    585589        var borderRadius = shape === 'circle' ? '50%' : (shape === 'rounded' ? '8px' : '0');
    586590        var justifyContent = alignment === 'center' ? 'center' : (alignment === 'right' ? 'flex-end' : 'flex-start');
    587591
     592        // Generate unique class for this widget instance
     593        var widgetClass = 'a1tools-editor-' + view.getID();
     594
    588595        // Actual available platforms from the site
    589596        var platforms = <?php echo wp_json_encode( $js_platforms ); ?>;
     597
     598        // Build hover CSS
     599        var hoverCSS = '';
     600        if (hoverEffect === 'scale') {
     601            hoverCSS += '.' + widgetClass + ' .a1tools-ed-icon:hover { transform: scale(1.1); }';
     602        } else if (hoverEffect === 'lift') {
     603            hoverCSS += '.' + widgetClass + ' .a1tools-ed-icon:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }';
     604        } else if (hoverEffect === 'rotate') {
     605            hoverCSS += '.' + widgetClass + ' .a1tools-ed-icon:hover { transform: rotate(15deg); }';
     606        } else if (hoverEffect === 'pulse') {
     607            hoverCSS += '.' + widgetClass + ' .a1tools-ed-icon:hover { animation: a1tools-pulse 0.5s ease; }';
     608            hoverCSS += '@keyframes a1tools-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }';
     609        }
     610
     611        // Custom hover colors
     612        if (style === 'custom' && (customHoverIconColor || customHoverBgColor || customHoverBorderColor)) {
     613            var hoverRules = '';
     614            if (customHoverIconColor) {
     615                hoverRules += 'color:' + customHoverIconColor + ' !important;';
     616            }
     617            if (customHoverBgColor) {
     618                hoverRules += 'background-color:' + customHoverBgColor + ' !important;';
     619            }
     620            if (customHoverBorderColor && customBorderWidth > 0) {
     621                hoverRules += 'border-color:' + customHoverBorderColor + ' !important;';
     622            }
     623            if (hoverRules) {
     624                hoverCSS += '.' + widgetClass + ' .a1tools-ed-icon:hover { ' + hoverRules + ' }';
     625                if (customHoverIconColor) {
     626                    hoverCSS += '.' + widgetClass + ' .a1tools-ed-icon:hover i { color:' + customHoverIconColor + ' !important; }';
     627                }
     628            }
     629        }
    590630        #>
    591         <div class="a1tools-social-icons-wrapper" style="display: flex; flex-wrap: wrap; gap: {{ spacing }}px; justify-content: {{ justifyContent }};">
     631        <style>{{{ hoverCSS }}}</style>
     632        <div class="a1tools-social-icons-wrapper {{ widgetClass }}" style="display: flex; flex-wrap: wrap; gap: {{ spacing }}px; justify-content: {{ justifyContent }};">
    592633            <# _.each(platforms, function(platform) {
    593634                var bgColor = '';
     
    626667                }
    627668            #>
    628             <a href="#" style="display: inline-flex; align-items: center; justify-content: center; width: {{ size }}px; height: {{ size }}px; background: {{ bgColor }}; color: {{ iconColor }}; border-radius: {{ borderRadius }}; border: {{ border }}; text-decoration: none; transition: all 0.3s ease;">
    629                 <i class="{{ platform.prefix }} {{ platform.icon }}" style="font-size: {{ iconSize }}px;"></i>
     669            <a href="#" class="a1tools-ed-icon" style="display: inline-flex; align-items: center; justify-content: center; width: {{ size }}px; height: {{ size }}px; background: {{ bgColor }}; color: {{ iconColor }}; border-radius: {{ borderRadius }}; border: {{ border }}; text-decoration: none; transition: all 0.3s ease; box-sizing: border-box;">
     670                <i class="{{ platform.prefix }} {{ platform.icon }}" style="font-size: {{ iconSize }}px; color: inherit;"></i>
    630671            </a>
    631672            <# }); #>
  • a1-tools/trunk/readme.txt

    r3458184 r3458190  
    44Requires at least: 5.0
    55Tested up to: 6.9
    6 Stable tag: 1.4.6
     6Stable tag: 1.4.7
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    151151
    152152== Changelog ==
     153
     154= 1.4.7 =
     155* Fixed hover effects (scale, lift, rotate, pulse) not showing in Elementor editor preview
     156* Fixed custom hover colors not applying in Elementor editor preview
     157* Editor preview now matches frontend hover behavior
    153158
    154159= 1.4.6 =
Note: See TracChangeset for help on using the changeset viewer.