| @@ -1,7 +1,11 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace ABlocks\Blocks\MenuChildMega; |
| 3 | 3 | |
| 4 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 5 | + exit; | |
| 6 | +} | |
| 7 | + | |
| 4 | 8 | use ABlocks\Classes\BlockBaseAbstract; |
| 5 | 9 | use ABlocks\Classes\CssGenerator; |
| 6 | 10 | use ABlocks\Controls\Range; |
| 7 | 11 | |
| @@ -16,9 +20,10 @@ | ||
| 16 | 20 | $css_generator->add_class_styles( |
| 17 | 21 | '{{WRAPPER}}', |
| 18 | 22 | $this->get_wrapper_css( $attributes, '' ), |
| 19 | 23 | $this->get_wrapper_css( $attributes, 'Tablet' ), |
| 20 | - $this->get_wrapper_css( $attributes, 'Mobile' ) | |
| 24 | + $this->get_wrapper_css( $attributes, 'Mobile' ), | |
| 25 | + $css_generator->custom_device_map( function ( $device ) use ( $attributes ) { return $this->get_wrapper_css( $attributes, $device ); } ) | |
| 21 | 26 | ); |
| 22 | 27 | return $css_generator->generate_css(); |
| 23 | 28 | } |
| 24 | 29 | private function get_wrapper_css( $attributes, $device = '' ) { |