| @@ -38,9 +38,9 @@ | ||
| 38 | 38 | * @param array|null $args |
| 39 | 39 | * |
| 40 | 40 | * @return void |
| 41 | 41 | */ |
| 42 | - public function __construct( array $data = [], ?array $args = null ) { | |
| 42 | + public function __construct( array $data = [], array $args = null ) { | |
| 43 | 43 | parent::__construct( $data, $args ); |
| 44 | 44 | |
| 45 | 45 | $this->active_kit = Plugin::$instance->kits_manager->get_active_kit(); |
| 46 | 46 | } |
| @@ -139,9 +139,8 @@ | ||
| 139 | 139 | $config['controls'] = $this->get_controls(); |
| 140 | 140 | $config['tabs_controls'] = $this->get_tabs_controls(); |
| 141 | 141 | $config['show_in_panel'] = true; |
| 142 | 142 | $config['categories'] = [ 'layout' ]; |
| 143 | - $config['include_in_widgets_config'] = true; | |
| 144 | 143 | |
| 145 | 144 | return $config; |
| 146 | 145 | } |
| 147 | 146 | |
| @@ -162,14 +161,9 @@ | ||
| 162 | 161 | if ( ! settings.background_play_once ) { |
| 163 | 162 | videoAttributes += ' loop'; |
| 164 | 163 | } |
| 165 | 164 | |
| 166 | - view.addRenderAttribute( | |
| 167 | - 'background-video-container', | |
| 168 | - { | |
| 169 | - 'class': 'elementor-background-video-container', | |
| 170 | - } | |
| 171 | - ); | |
| 165 | + view.addRenderAttribute( 'background-video-container', 'class', 'elementor-background-video-container' ); | |
| 172 | 166 | |
| 173 | 167 | if ( ! settings.background_play_on_mobile ) { |
| 174 | 168 | view.addRenderAttribute( 'background-video-container', 'class', 'elementor-hidden-mobile' ); |
| 175 | 169 | } |
| @@ -174,14 +168,14 @@ | ||
| 174 | 168 | view.addRenderAttribute( 'background-video-container', 'class', 'elementor-hidden-mobile' ); |
| 175 | 169 | } |
| 176 | 170 | #> |
| 177 | 171 | <div {{{ view.getRenderAttributeString( 'background-video-container' ) }}}> |
| 178 | - <div class="elementor-background-video-embed" role="presentation"></div> | |
| 179 | - <video class="elementor-background-video-hosted" role="presentation" {{ videoAttributes }}></video> | |
| 172 | + <div class="elementor-background-video-embed"></div> | |
| 173 | + <video class="elementor-background-video-hosted" {{ videoAttributes }}></video> | |
| 180 | 174 | </div> |
| 181 | 175 | <# } #> |
| 182 | - <div class="elementor-shape elementor-shape-top" aria-hidden="true"></div> | |
| 183 | - <div class="elementor-shape elementor-shape-bottom" aria-hidden="true"></div> | |
| 176 | + <div class="elementor-shape elementor-shape-top"></div> | |
| 177 | + <div class="elementor-shape elementor-shape-bottom"></div> | |
| 184 | 178 | <# if ( 'boxed' === settings.content_width ) { #> |
| 185 | 179 | </div> |
| 186 | 180 | <# } #> |
| 187 | 181 | <?php |
| @@ -204,14 +198,9 @@ | ||
| 204 | 198 | } |
| 205 | 199 | |
| 206 | 200 | $video_properties = Embed::get_video_properties( $settings['background_video_link'] ); |
| 207 | 201 | |
| 208 | - $this->add_render_attribute( | |
| 209 | - 'background-video-container', | |
| 210 | - [ | |
| 211 | - 'class' => 'elementor-background-video-container', | |
| 212 | - ] | |
| 213 | - ); | |
| 202 | + $this->add_render_attribute( 'background-video-container', 'class', 'elementor-background-video-container' ); | |
| 214 | 203 | |
| 215 | 204 | if ( ! $settings['background_play_on_mobile'] ) { |
| 216 | 205 | $this->add_render_attribute( 'background-video-container', 'class', 'elementor-hidden-mobile' ); |
| 217 | 206 | } |
| @@ -217,9 +206,9 @@ | ||
| 217 | 206 | } |
| 218 | 207 | |
| 219 | 208 | ?><div <?php $this->print_render_attribute_string( 'background-video-container' ); ?>> |
| 220 | 209 | <?php if ( $video_properties ) : ?> |
| 221 | - <div class="elementor-background-video-embed" role="presentation"></div> | |
| 210 | + <div class="elementor-background-video-embed"></div> | |
| 222 | 211 | <?php |
| 223 | 212 | else : |
| 224 | 213 | $video_tag_attributes = 'autoplay muted playsinline'; |
| 225 | 214 | |
| @@ -226,9 +215,9 @@ | ||
| 226 | 215 | if ( 'yes' !== $settings['background_play_once'] ) { |
| 227 | 216 | $video_tag_attributes .= ' loop'; |
| 228 | 217 | } |
| 229 | 218 | ?> |
| 230 | - <video class="elementor-background-video-hosted" role="presentation" <?php echo esc_attr( $video_tag_attributes ); ?>></video> | |
| 219 | + <video class="elementor-background-video-hosted" <?php echo esc_attr( $video_tag_attributes ); ?>></video> | |
| 231 | 220 | <?php endif; ?> |
| 232 | 221 | </div><?php |
| 233 | 222 | } |
| 234 | 223 | |
| @@ -251,9 +240,9 @@ | ||
| 251 | 240 | if ( ! is_file( $shape_path ) || ! is_readable( $shape_path ) ) { |
| 252 | 241 | return; |
| 253 | 242 | } |
| 254 | 243 | ?> |
| 255 | - <div class="elementor-shape elementor-shape-<?php echo esc_attr( $side ); ?>" aria-hidden="true" data-negative="<?php | |
| 244 | + <div class="elementor-shape elementor-shape-<?php echo esc_attr( $side ); ?>" data-negative="<?php | |
| 256 | 245 | Utils::print_unescaped_internal_string( $negative ? 'true' : 'false' ); |
| 257 | 246 | ?>"> |
| 258 | 247 | <?php |
| 259 | 248 | // PHPCS - The file content is being read from a strict file path structure. |
| @@ -333,18 +322,12 @@ | ||
| 333 | 322 | * |
| 334 | 323 | * @return \Elementor\Element_Base|\Elementor\Widget_Base|null |
| 335 | 324 | */ |
| 336 | 325 | protected function _get_default_child_type( array $element_data ) { |
| 337 | - $el_types = array_keys( Plugin::$instance->elements_manager->get_element_types() ); | |
| 338 | - | |
| 339 | - if ( in_array( $element_data['elType'], $el_types, true ) ) { | |
| 340 | - return Plugin::$instance->elements_manager->get_element_types( $element_data['elType'] ); | |
| 326 | + if ( 'container' === $element_data['elType'] ) { | |
| 327 | + return Plugin::$instance->elements_manager->get_element_types( 'container' ); | |
| 341 | 328 | } |
| 342 | 329 | |
| 343 | - if ( ! isset( $element_data['widgetType'] ) ) { | |
| 344 | - return null; | |
| 345 | - } | |
| 346 | - | |
| 347 | 330 | return Plugin::$instance->widgets_manager->get_widget_types( $element_data['widgetType'] ); |
| 348 | 331 | } |
| 349 | 332 | |
| 350 | 333 | /** |
| @@ -492,9 +475,8 @@ | ||
| 492 | 475 | 'max' => 1440, |
| 493 | 476 | ], |
| 494 | 477 | ], |
| 495 | 478 | 'description' => sprintf( |
| 496 | - /* translators: %s: 100vh. */ | |
| 497 | 479 | esc_html__( 'To achieve full height Container use %s.', 'elementor' ), |
| 498 | 480 | '100vh' |
| 499 | 481 | ), |
| 500 | 482 | 'selectors' => [ |
| @@ -1180,8 +1162,16 @@ | ||
| 1180 | 1162 | ); |
| 1181 | 1163 | |
| 1182 | 1164 | $this->start_controls_tabs( 'tabs_shape_dividers' ); |
| 1183 | 1165 | |
| 1166 | + $shapes_options = [ | |
| 1167 | + '' => esc_html__( 'None', 'elementor' ), | |
| 1168 | + ]; | |
| 1169 | + | |
| 1170 | + foreach ( Shapes::get_shapes() as $shape_name => $shape_props ) { | |
| 1171 | + $shapes_options[ $shape_name ] = $shape_props['title']; | |
| 1172 | + } | |
| 1173 | + | |
| 1184 | 1174 | foreach ( [ |
| 1185 | 1175 | 'top' => esc_html__( 'Top', 'elementor' ), |
| 1186 | 1176 | 'bottom' => esc_html__( 'Bottom', 'elementor' ), |
| 1187 | 1177 | ] as $side => $side_label ) { |
| @@ -1197,12 +1187,10 @@ | ||
| 1197 | 1187 | $this->add_control( |
| 1198 | 1188 | $base_control_key, |
| 1199 | 1189 | [ |
| 1200 | 1190 | 'label' => esc_html__( 'Type', 'elementor' ), |
| 1201 | - 'type' => Controls_Manager::VISUAL_CHOICE, | |
| 1202 | - 'label_block' => true, | |
| 1203 | - 'columns' => 2, | |
| 1204 | - 'options' => Shapes::get_shapes(), | |
| 1191 | + 'type' => Controls_Manager::SELECT, | |
| 1192 | + 'options' => $shapes_options, | |
| 1205 | 1193 | 'render_type' => 'none', |
| 1206 | 1194 | 'frontend_available' => true, |
| 1207 | 1195 | 'assets' => [ |
| 1208 | 1196 | 'styles' => [ |
| @@ -1412,9 +1400,9 @@ | ||
| 1412 | 1400 | [ |
| 1413 | 1401 | 'label' => esc_html__( 'Column Span', 'elementor' ), |
| 1414 | 1402 | 'type' => Controls_Manager::SELECT, |
| 1415 | 1403 | 'options' => [ |
| 1416 | - '' => ' ' . esc_html__( 'Default', 'elementor' ), | |
| 1404 | + '' => ' Default', | |
| 1417 | 1405 | '1' => '1', |
| 1418 | 1406 | '2' => '2', |
| 1419 | 1407 | '3' => '3', |
| 1420 | 1408 | '4' => '4', |
| @@ -1425,9 +1413,9 @@ | ||
| 1425 | 1413 | '9' => '9', |
| 1426 | 1414 | '10' => '10', |
| 1427 | 1415 | '11' => '11', |
| 1428 | 1416 | '12' => '12', |
| 1429 | - 'custom' => esc_html__( 'Custom', 'elementor' ), | |
| 1417 | + 'custom' => 'Custom', | |
| 1430 | 1418 | ], |
| 1431 | 1419 | 'selectors' => [ |
| 1432 | 1420 | '{{WRAPPER}}' => 'grid-column: span {{VALUE}};', |
| 1433 | 1421 | ], |
| @@ -1456,9 +1444,9 @@ | ||
| 1456 | 1444 | [ |
| 1457 | 1445 | 'label' => esc_html__( 'Row Span', 'elementor' ), |
| 1458 | 1446 | 'type' => Controls_Manager::SELECT, |
| 1459 | 1447 | 'options' => [ |
| 1460 | - '' => ' ' . esc_html__( 'Default', 'elementor' ), | |
| 1448 | + '' => ' Default', | |
| 1461 | 1449 | '1' => '1', |
| 1462 | 1450 | '2' => '2', |
| 1463 | 1451 | '3' => '3', |
| 1464 | 1452 | '4' => '4', |
| @@ -1469,9 +1457,9 @@ | ||
| 1469 | 1457 | '9' => '9', |
| 1470 | 1458 | '10' => '10', |
| 1471 | 1459 | '11' => '11', |
| 1472 | 1460 | '12' => '12', |
| 1473 | - 'custom' => esc_html__( 'Custom', 'elementor' ), | |
| 1461 | + 'custom' => 'Custom', | |
| 1474 | 1462 | ], |
| 1475 | 1463 | 'selectors' => [ |
| 1476 | 1464 | '{{WRAPPER}}' => 'grid-row: span {{VALUE}};', |
| 1477 | 1465 | ], |