| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | <?php |
| 2 | + | |
| 2 | 3 | namespace UiCoreElements; |
| 3 | 4 | |
| 4 | 5 | use Elementor\Controls_Manager; |
| 5 | 6 | |
| @@ -37,18 +38,19 @@ | ||
| 37 | 38 | $styles[] = 'gallery-slider'; |
| 38 | 39 | |
| 39 | 40 | return $styles; |
| 40 | 41 | } |
| 41 | - // TODO: remove or set as false, after 3.30, when the full deprecation of widget innet wrapper is ready | |
| 42 | - public function has_widget_inner_wrapper(): bool { | |
| 43 | - return true; | |
| 44 | - } | |
| 42 | + // TODO: remove after Optmized Markup experiment is merged to the core | |
| 43 | + public function has_widget_inner_wrapper(): bool | |
| 44 | + { | |
| 45 | + return true; | |
| 46 | + } | |
| 45 | 47 | protected function register_controls() |
| 46 | 48 | { |
| 47 | 49 | parent::register_controls(); |
| 48 | 50 | $this->TRAIT_update_slider_controls(); |
| 49 | 51 | |
| 50 | - // Remove conditions from image height | |
| 52 | + // Remove conditions from image height and image style section | |
| 51 | 53 | $this->update_responsive_control( |
| 52 | 54 | 'image_height', |
| 53 | 55 | [ |
| 54 | 56 | 'conditions' => false, |
| @@ -53,8 +55,14 @@ | ||
| 53 | 55 | [ |
| 54 | 56 | 'conditions' => false, |
| 55 | 57 | ] |
| 56 | 58 | ); |
| 59 | + $this->update_responsive_control( | |
| 60 | + 'style_image_section', | |
| 61 | + [ | |
| 62 | + 'conditions' => false, | |
| 63 | + ] | |
| 64 | + ); | |
| 57 | 65 | |
| 58 | 66 | // Remove item active state styles |
| 59 | 67 | $this->remove_control('tab_item_active'); |
| 60 | 68 | $this->remove_control('item_active_background'); |
| @@ -69,37 +77,37 @@ | ||
| 69 | 77 | 'of' => 'layout', |
| 70 | 78 | 'at' => 'after', |
| 71 | 79 | ]); |
| 72 | 80 | |
| 73 | - $this->add_responsive_control( | |
| 74 | - 'content_v_alignment', | |
| 75 | - [ | |
| 76 | - 'label' => __('Vertical Alignment', 'uicore-elements'), | |
| 77 | - 'type' => Controls_Manager::CHOOSE, | |
| 78 | - 'default' => 'start', | |
| 79 | - 'options' => [ | |
| 80 | - 'start' => [ | |
| 81 | - 'title' => __('Start', 'uicore-elements'), | |
| 82 | - 'icon' => 'eicon-align-start-v', | |
| 83 | - ], | |
| 84 | - 'center' => [ | |
| 85 | - 'title' => __('Center', 'uicore-elements'), | |
| 86 | - 'icon' => 'eicon-align-center-v', | |
| 87 | - ], | |
| 88 | - 'end' => [ | |
| 89 | - 'title' => __('Bottom', 'uicore-elements'), | |
| 90 | - 'icon' => 'eicon-align-end-v', | |
| 91 | - ], | |
| 81 | + $this->add_responsive_control( | |
| 82 | + 'content_v_alignment', | |
| 83 | + [ | |
| 84 | + 'label' => __('Vertical Alignment', 'uicore-elements'), | |
| 85 | + 'type' => Controls_Manager::CHOOSE, | |
| 86 | + 'default' => 'start', | |
| 87 | + 'options' => [ | |
| 88 | + 'start' => [ | |
| 89 | + 'title' => __('Start', 'uicore-elements'), | |
| 90 | + 'icon' => 'eicon-align-start-v', | |
| 92 | 91 | ], |
| 93 | - 'condition' => [ | |
| 94 | - 'layout' => 'ui-e-overlay' | |
| 92 | + 'center' => [ | |
| 93 | + 'title' => __('Center', 'uicore-elements'), | |
| 94 | + 'icon' => 'eicon-align-center-v', | |
| 95 | 95 | ], |
| 96 | - 'selectors' => [ | |
| 97 | - '{{WRAPPER}} .ui-e-content' => 'justify-content: {{VALUE}};', | |
| 98 | - ] | |
| 96 | + 'end' => [ | |
| 97 | + 'title' => __('Bottom', 'uicore-elements'), | |
| 98 | + 'icon' => 'eicon-align-end-v', | |
| 99 | + ], | |
| 100 | + ], | |
| 101 | + 'condition' => [ | |
| 102 | + 'layout' => 'ui-e-overlay' | |
| 103 | + ], | |
| 104 | + 'selectors' => [ | |
| 105 | + '{{WRAPPER}} .ui-e-content' => 'justify-content: {{VALUE}};', | |
| 99 | 106 | ] |
| 100 | - ); | |
| 107 | + ] | |
| 108 | + ); | |
| 101 | 109 | |
| 102 | 110 | $this->end_injection(); |
| 103 | 111 | } |
| 104 | 112 | } |
| 105 | -\Elementor\Plugin::instance()->widgets_manager->register(new GallerySlider()); | |
| 113 | +\Elementor\Plugin::instance()->widgets_manager->register(new GallerySlider()); | |