Changeset 3382601
- Timestamp:
- 10/22/2025 12:47:36 PM (8 weeks ago)
- Location:
- athemes-blocks/trunk
- Files:
-
- 3 edited
-
athemes-blocks.php (modified) (1 diff)
-
includes/Blocks/BlockCss.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
athemes-blocks/trunk/athemes-blocks.php
r3362249 r3382601 3 3 * Plugin Name: aThemes Blocks 4 4 * Description: aThemes Blocks is a Gutenberg plugin extending the WordPress editor with awesome blocks. 5 * Version: 1.1. 25 * Version: 1.1.3 6 6 * Author: aThemes 7 7 * Author URI: https://athemes.com -
athemes-blocks/trunk/includes/Blocks/BlockCss.php
r3343697 r3382601 150 150 : str_replace( array( '{{VALUE}}', '{{UNIT}}' ), array( $value['value'], $unit ), $selector_value ); 151 151 152 if ( $is_color_picker ) { 153 if ( empty( $replaced_selector_value ) || $replaced_selector_value === '{{HOVER}}' && empty( $value['value']['hoverState'] ) ) { 154 continue; 155 } 156 157 $replaced_selector_value = str_replace( array( '{{VALUE}}', '{{HOVER}}' ), array( $value['value']['defaultState'], $value['value']['hoverState'] ), $selector_value ); 158 } 152 if ( $is_color_picker ) { 153 $default_state = $value['value']['defaultState'] ?? ''; 154 $hover_state = $value['value']['hoverState'] ?? ''; 155 156 if ( empty( $replaced_selector_value ) || $replaced_selector_value === '{{HOVER}}' && empty( $hover_state ) ) { 157 continue; 158 } 159 160 $replaced_selector_value = str_replace( array( '{{VALUE}}', '{{HOVER}}' ), array( $default_state, $hover_state ), $selector_value ); 161 } 159 162 160 163 if ( $value_is_object ) { … … 196 199 } 197 200 198 if ( $is_color_picker ) {199 if ($value['value']['defaultState'] !== '' ) {200 $responsive_values['desktop'][$selector][] = sprintf( '%s: %s', $property, $value['value']['defaultState'] );201 }202 203 if ($value['value']['hoverState'] !== '' ) {204 $responsive_values['desktop']["$selector:hover"][] = sprintf( '%s: %s', $property, $value['value']['hoverState'] );205 }206 }201 if ( $is_color_picker ) { 202 if ( isset( $value['value']['defaultState'] ) && $value['value']['defaultState'] !== '' ) { 203 $responsive_values['desktop'][$selector][] = sprintf( '%s: %s', $property, $value['value']['defaultState'] ); 204 } 205 206 if ( isset( $value['value']['hoverState'] ) && $value['value']['hoverState'] !== '' ) { 207 $responsive_values['desktop']["$selector:hover"][] = sprintf( '%s: %s', $property, $value['value']['hoverState'] ); 208 } 209 } 207 210 208 211 if ( $is_background_image ) { … … 244 247 } 245 248 246 if ( $is_color_picker ) {247 if ($value['value']['defaultState'] !== '' ) {248 $responsive_values[$device][$selector][] = sprintf( '%s: %s %s', $property, $value['value']['defaultState'], $important ? '!important' : '' );249 }250 251 if ($value['value']['hoverState'] !== '' ) {252 $responsive_values[$device]["$selector:hover"][] = sprintf( '%s: %s %s', $property, $value['value']['hoverState'], $important ? '!important' : '' );253 }254 }249 if ( $is_color_picker ) { 250 if ( isset( $value['value']['defaultState'] ) && $value['value']['defaultState'] !== '' ) { 251 $responsive_values[$device][$selector][] = sprintf( '%s: %s %s', $property, $value['value']['defaultState'], $important ? '!important' : '' ); 252 } 253 254 if ( isset( $value['value']['hoverState'] ) && $value['value']['hoverState'] !== '' ) { 255 $responsive_values[$device]["$selector:hover"][] = sprintf( '%s: %s %s', $property, $value['value']['hoverState'], $important ? '!important' : '' ); 256 } 257 } 255 258 256 259 if ( $is_background_image ) { -
athemes-blocks/trunk/readme.txt
r3362249 r3382601 4 4 Tested up to: 6.6 5 5 Requires PHP: 5.6 6 Stable tag: 1.1. 26 Stable tag: 1.1.3 7 7 Contributors: aThemes 8 8 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.