| @@ -181,14 +181,12 @@ | ||
| 181 | 181 | $value = wp_parse_args( $attribute_value, self::responsive_defaults() ); |
| 182 | 182 | $css = []; |
| 183 | 183 | |
| 184 | 184 | // Separate handling of width units |
| 185 | + // Resolved from the full value so a custom breakpoint's own unit key | |
| 186 | + // takes part; for Tablet/Mobile this reads the same three keys as before. | |
| 185 | 187 | if ( $device ) { |
| 186 | - $widthUnit = self::get_unit([ | |
| 187 | - 'unit' => $value['unitWidth'], | |
| 188 | - 'unitTablet' => $value['unitWidthTablet'], | |
| 189 | - 'unitMobile' => $value['unitWidthMobile'], | |
| 190 | - ], $device); | |
| 188 | + $widthUnit = \ABlocks\Helper::get_responsive_value( $value, 'unitWidth', $device ); | |
| 191 | 189 | } else { |
| 192 | 190 | $widthUnit = $value['unitWidth']; |
| 193 | 191 | } |
| 194 | 192 | |
| @@ -231,13 +229,9 @@ | ||
| 231 | 229 | } |
| 232 | 230 | |
| 233 | 231 | // Separate handling of radius units |
| 234 | 232 | if ( $device ) { |
| 235 | - $radiusUnit = self::get_unit([ | |
| 236 | - 'unit' => $value['unitRadius'], | |
| 237 | - 'unitTablet' => $value['unitRadiusTablet'], | |
| 238 | - 'unitMobile' => $value['unitRadiusMobile'], | |
| 239 | - ], $device); | |
| 233 | + $radiusUnit = \ABlocks\Helper::get_responsive_value( $value, 'unitRadius', $device ); | |
| 240 | 234 | } else { |
| 241 | 235 | $radiusUnit = $value['unitRadius']; |
| 242 | 236 | } |
| 243 | 237 | |