← All changes
|
modules/atomic-widgets/css-converter/property-converter-base.php
+0
-14
4.3.0
→
4.2.1
View file →
| @@ -24,27 +24,13 @@ | ||
| 24 | 24 | return in_array( $property, $this->get_supported_properties(), true ); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | public function convert( Conversion_Context $context, array $rule ): bool { |
| 28 | - $custom = $this->get_custom_converter( $context, $rule ); | |
| 29 | - | |
| 30 | - if ( null !== $custom ) { | |
| 31 | - return $custom(); | |
| 32 | - } | |
| 33 | - | |
| 34 | 28 | if ( null === $rule['value'] ) { |
| 35 | 29 | return $this->convert_null( $context, $rule ); |
| 36 | 30 | } |
| 37 | 31 | |
| 38 | 32 | return $this->do_convert( $context, $rule ); |
| 39 | - } | |
| 40 | - | |
| 41 | - /** | |
| 42 | - * Override to handle special-case rules before the standard null-check and do_convert path. | |
| 43 | - * Receives the full rule (value may be null). Return null to fall through to default behavior. | |
| 44 | - */ | |
| 45 | - protected function get_custom_converter( Conversion_Context $context, array $rule ): ?callable { | |
| 46 | - return null; | |
| 47 | 33 | } |
| 48 | 34 | |
| 49 | 35 | /** |
| 50 | 36 | * Override to customize null-reset behavior. Default: set the prop to null directly. |