← All changes
|
modules/atomic-widgets/css-converter/converters/background-image-converter.php
+10
-1
4.2.0-beta1
→
trunk
View file →
| @@ -25,9 +25,18 @@ | ||
| 25 | 25 | protected function get_supported_properties(): array { |
| 26 | 26 | return [ 'background-image' ]; |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | - public function convert( Conversion_Context $context, array $rule ): bool { | |
| 29 | + protected function convert_null( Conversion_Context $context, array $rule ): bool { | |
| 30 | + $fields = $this->current_background_fields( $context->get_prop( 'background' ) ); | |
| 31 | + $fields['background-overlay'] = null; | |
| 32 | + | |
| 33 | + $context->set_prop( 'background', Background_Prop_Type::generate( $fields ) ); | |
| 34 | + | |
| 35 | + return true; | |
| 36 | + } | |
| 37 | + | |
| 38 | + protected function do_convert( Conversion_Context $context, array $rule ): bool { | |
| 30 | 39 | $overlays = Background_Image_Value_Parser::parse( trim( $rule['value'] ) ); |
| 31 | 40 | |
| 32 | 41 | if ( null === $overlays ) { |
| 33 | 42 | return false; |