Changeset 3458184
- Timestamp:
- 02/10/2026 03:46:17 PM (12 days ago)
- Location:
- a1-tools/trunk
- Files:
-
- 3 edited
-
a1-tools.php (modified) (2 diffs)
-
includes/class-a1-tools-elementor-widget.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
a1-tools/trunk/a1-tools.php
r3457342 r3458184 4 4 * Plugin URI: https://tools.a-1chimney.com 5 5 * 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. 56 * Version: 1.4.6 7 7 * Requires at least: 5.0 8 8 * Requires PHP: 7.4 … … 21 21 22 22 // Plugin constants. 23 define( 'A1TOOLS_VERSION', '1.4. 5' );23 define( 'A1TOOLS_VERSION', '1.4.6' ); 24 24 define( 'A1TOOLS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 25 25 define( 'A1TOOLS_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); -
a1-tools/trunk/includes/class-a1-tools-elementor-widget.php
r3457342 r3458184 398 398 $hover_effect = ! empty( $settings['hover_effect'] ) ? $settings['hover_effect'] : 'scale'; 399 399 400 // Custom style colors 401 $custom_icon_color = ! empty( $settings['custom_icon_color'] ) ? $settings['custom_icon_color'] : '#ffffff';402 $custom_bg_color = ! empty( $settings['custom_bg_color'] ) ? $settings['custom_bg_color'] : '#F7941E';403 $custom_border_color = ! empty( $settings['custom_border_color'] ) ? $settings['custom_border_color'] : '';404 $custom_border_width = isset( $settings['custom_border_width']['size'] ) ? (int) $settings['custom_border_width']['size'] : 0;405 $custom_hover_icon_color = ! empty( $settings['custom_hover_icon_color'] ) ? $settings['custom_hover_icon_color'] : '';406 $custom_hover_bg_color = ! empty( $settings['custom_hover_bg_color'] ) ? $settings['custom_hover_bg_color'] : '';400 // Custom style colors - these can be hex colors OR CSS variables from Elementor global colors 401 $custom_icon_color = ! empty( $settings['custom_icon_color'] ) ? $settings['custom_icon_color'] : '#ffffff'; 402 $custom_bg_color = ! empty( $settings['custom_bg_color'] ) ? $settings['custom_bg_color'] : '#F7941E'; 403 $custom_border_color = ! empty( $settings['custom_border_color'] ) ? $settings['custom_border_color'] : ''; 404 $custom_border_width = isset( $settings['custom_border_width']['size'] ) ? (int) $settings['custom_border_width']['size'] : 0; 405 $custom_hover_icon_color = ! empty( $settings['custom_hover_icon_color'] ) ? $settings['custom_hover_icon_color'] : ''; 406 $custom_hover_bg_color = ! empty( $settings['custom_hover_bg_color'] ) ? $settings['custom_hover_bg_color'] : ''; 407 407 $custom_hover_border_color = ! empty( $settings['custom_hover_border_color'] ) ? $settings['custom_hover_border_color'] : ''; 408 408 … … 418 418 } 419 419 420 // Build CSS 421 $css = '#' . esc_attr( $widget_id ) . ' { text-align:' . esc_attr( $alignment ) . '; }'; 422 $css .= '#' . esc_attr( $widget_id ) . ' .a1tools-social-icon { '; 423 $css .= 'width:' . $size . 'px;height:' . $size . 'px;'; 420 // Build CSS - use high specificity selectors to ensure styles apply 421 $selector = '#' . esc_attr( $widget_id ); 422 423 $css = $selector . ' { text-align:' . esc_attr( $alignment ) . '; line-height: 0; }'; 424 $css .= $selector . ' .a1tools-social-icon { '; 425 $css .= 'width:' . $size . 'px;'; 426 $css .= 'height:' . $size . 'px;'; 424 427 $css .= 'margin:0 ' . ( $spacing / 2 ) . 'px ' . $spacing . 'px;'; 425 428 $css .= 'font-size:' . $icon_size . 'px;'; 426 $css .= 'display:inline-flex;align-items:center;justify-content:center;'; 427 $css .= 'text-decoration:none;transition:all 0.3s ease;'; 429 $css .= 'line-height:' . $size . 'px;'; 430 $css .= 'display:inline-flex;'; 431 $css .= 'align-items:center;'; 432 $css .= 'justify-content:center;'; 433 $css .= 'vertical-align:middle;'; 434 $css .= 'text-decoration:none;'; 435 $css .= 'transition:all 0.3s ease;'; 428 436 $css .= 'border-radius:' . esc_attr( $border_radius ) . ';'; 437 $css .= 'box-sizing:border-box;'; 438 $css .= '}'; 439 440 // Icon element styling - ensure it inherits color properly 441 $css .= $selector . ' .a1tools-social-icon i { '; 442 $css .= 'display:flex;'; 443 $css .= 'align-items:center;'; 444 $css .= 'justify-content:center;'; 445 $css .= 'width:100%;'; 446 $css .= 'height:100%;'; 447 $css .= 'line-height:1;'; 429 448 $css .= '}'; 430 449 431 450 // Style-specific CSS 432 451 if ( 'custom' === $style ) { 433 $css .= '#' . esc_attr( $widget_id ) . ' .a1tools-social-icon { '; 434 $css .= 'color:' . esc_attr( $custom_icon_color ) . ';'; 435 $css .= 'background-color:' . esc_attr( $custom_bg_color ) . ';'; 452 // Apply custom colors with high specificity 453 $css .= $selector . ' .a1tools-social-icon,'; 454 $css .= $selector . ' .a1tools-social-icon i { '; 455 $css .= 'color:' . $custom_icon_color . ' !important;'; 456 $css .= '}'; 457 $css .= $selector . ' .a1tools-social-icon { '; 458 $css .= 'background-color:' . $custom_bg_color . ' !important;'; 436 459 if ( $custom_border_width > 0 && $custom_border_color ) { 437 $css .= 'border:' . $custom_border_width . 'px solid ' . esc_attr( $custom_border_color ) . ';'; 460 $css .= 'border:' . $custom_border_width . 'px solid ' . $custom_border_color . ' !important;'; 461 } else { 462 $css .= 'border:none;'; 438 463 } 439 464 $css .= '}'; 440 465 441 466 // Custom hover colors 442 $hover_css_parts = array(); 443 if ( $custom_hover_icon_color ) { 444 $hover_css_parts[] = 'color:' . esc_attr( $custom_hover_icon_color ); 445 } 446 if ( $custom_hover_bg_color ) { 447 $hover_css_parts[] = 'background-color:' . esc_attr( $custom_hover_bg_color ); 448 } 449 if ( $custom_hover_border_color && $custom_border_width > 0 ) { 450 $hover_css_parts[] = 'border-color:' . esc_attr( $custom_hover_border_color ); 451 } 452 if ( ! empty( $hover_css_parts ) ) { 453 $css .= '#' . esc_attr( $widget_id ) . ' .a1tools-social-icon:hover { ' . implode( ';', $hover_css_parts ) . '; }'; 467 if ( $custom_hover_icon_color || $custom_hover_bg_color || $custom_hover_border_color ) { 468 $css .= $selector . ' .a1tools-social-icon:hover,'; 469 $css .= $selector . ' .a1tools-social-icon:hover i { '; 470 if ( $custom_hover_icon_color ) { 471 $css .= 'color:' . $custom_hover_icon_color . ' !important;'; 472 } 473 $css .= '}'; 474 $css .= $selector . ' .a1tools-social-icon:hover { '; 475 if ( $custom_hover_bg_color ) { 476 $css .= 'background-color:' . $custom_hover_bg_color . ' !important;'; 477 } 478 if ( $custom_hover_border_color && $custom_border_width > 0 ) { 479 $css .= 'border-color:' . $custom_hover_border_color . ' !important;'; 480 } 481 $css .= '}'; 454 482 } 455 483 } elseif ( 'default' === $style || 'official' === $style ) { 456 $css .= '#' . esc_attr( $widget_id ) . ' .a1tools-social-icon{ color: #fff; }';484 $css .= $selector . ' .a1tools-social-icon,' . $selector . ' .a1tools-social-icon i { color: #fff; }'; 457 485 } elseif ( 'outline' === $style ) { 458 $css .= '#' . esc_attr( $widget_id ). ' .a1tools-social-icon { background: transparent; border: 2px solid; }';486 $css .= $selector . ' .a1tools-social-icon { background: transparent; border: 2px solid; }'; 459 487 } elseif ( 'minimal' === $style ) { 460 $css .= '#' . esc_attr( $widget_id ). ' .a1tools-social-icon { background: transparent; }';488 $css .= $selector . ' .a1tools-social-icon { background: transparent; }'; 461 489 } elseif ( 'light' === $style ) { 462 $css .= '#' . esc_attr( $widget_id ). ' .a1tools-social-icon { background: #f5f5f5; }';490 $css .= $selector . ' .a1tools-social-icon { background: #f5f5f5; }'; 463 491 } elseif ( 'dark' === $style ) { 464 $css .= '#' . esc_attr( $widget_id ) . ' .a1tools-social-icon { background: #333; color: #fff; }'; 465 } 466 467 // Hover effects (only for non-custom styles, or in addition to custom hover colors) 468 if ( 'custom' !== $style || empty( $hover_css_parts ) ) { 469 if ( 'scale' === $hover_effect ) { 470 $css .= '#' . esc_attr( $widget_id ) . ' .a1tools-social-icon:hover { transform: scale(1.1); }'; 471 } elseif ( 'lift' === $hover_effect ) { 472 $css .= '#' . esc_attr( $widget_id ) . ' .a1tools-social-icon:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }'; 473 } elseif ( 'rotate' === $hover_effect ) { 474 $css .= '#' . esc_attr( $widget_id ) . ' .a1tools-social-icon:hover { transform: rotate(15deg); }'; 475 } elseif ( 'pulse' === $hover_effect ) { 476 $css .= '#' . esc_attr( $widget_id ) . ' .a1tools-social-icon:hover { animation: a1tools-pulse 0.5s ease; }'; 477 $css .= '@keyframes a1tools-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }'; 478 } 492 $css .= $selector . ' .a1tools-social-icon,' . $selector . ' .a1tools-social-icon i { background: #333; color: #fff; }'; 493 } 494 495 // Hover effects 496 if ( 'scale' === $hover_effect ) { 497 $css .= $selector . ' .a1tools-social-icon:hover { transform: scale(1.1); }'; 498 } elseif ( 'lift' === $hover_effect ) { 499 $css .= $selector . ' .a1tools-social-icon:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }'; 500 } elseif ( 'rotate' === $hover_effect ) { 501 $css .= $selector . ' .a1tools-social-icon:hover { transform: rotate(15deg); }'; 502 } elseif ( 'pulse' === $hover_effect ) { 503 $css .= $selector . ' .a1tools-social-icon:hover { animation: a1tools-pulse 0.5s ease; }'; 504 $css .= '@keyframes a1tools-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }'; 479 505 } 480 506 -
a1-tools/trunk/readme.txt
r3457342 r3458184 4 4 Requires at least: 5.0 5 5 Tested up to: 6.9 6 Stable tag: 1.4. 56 Stable tag: 1.4.6 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 151 151 152 152 == Changelog == 153 154 = 1.4.6 = 155 * Fixed icon color not applying on frontend (was same color as background) 156 * Fixed Elementor global colors not working with Custom Colors style 157 * Fixed icons being pushed upwards on live site 158 * Improved CSS specificity to ensure custom styles override theme styles 153 159 154 160 = 1.4.5 =
Note: See TracChangeset
for help on using the changeset viewer.