PluginProbe
Elementor Website Builder – more than just a page builder / 3.16.2
Elementor Website Builder – more than just a page builder v3.16.2
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | includes/widgets/tabs.php +17 -84 4.2.0-dev23.16.2 View file →
@@ -73,34 +73,12 @@
73 73 public function get_keywords() {
74 74 return [ 'tabs', 'accordion', 'toggle' ];
75 75 }
76 76
77 - protected function is_dynamic_content(): bool {
78 - return false;
79 - }
80 -
81 - /**
82 - * Get style dependencies.
83 - *
84 - * Retrieve the list of style dependencies the widget requires.
85 - *
86 - * @since 3.24.0
87 - * @access public
88 - *
89 - * @return array Widget style dependencies.
90 - */
91 - public function get_style_depends(): array {
92 - return [ 'widget-tabs' ];
93 - }
94 -
95 77 public function show_in_panel(): bool {
96 - return ! Plugin::$instance->experiments->is_feature_active( 'nested-elements', true );
78 + return ! Plugin::$instance->experiments->is_feature_active( 'nested-elements' );
97 79 }
98 80
99 - public function has_widget_inner_wrapper(): bool {
100 - return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
101 - }
102 -
103 81 /**
104 82 * Register tabs widget controls.
105 83 *
106 84 * Adds different input fields to allow the user to change and customize the widget settings.
@@ -178,24 +156,26 @@
178 156 ]
179 157 );
180 158
181 159 $this->add_control(
160 + 'view',
161 + [
162 + 'label' => esc_html__( 'View', 'elementor' ),
163 + 'type' => Controls_Manager::HIDDEN,
164 + 'default' => 'traditional',
165 + ]
166 + );
167 +
168 + $this->add_control(
182 169 'type',
183 170 [
184 171 'label' => esc_html__( 'Position', 'elementor' ),
185 - 'type' => Controls_Manager::CHOOSE,
172 + 'type' => Controls_Manager::SELECT,
186 173 'default' => 'horizontal',
187 174 'options' => [
188 - 'vertical' => [
189 - 'title' => esc_html__( 'Vertical', 'elementor' ),
190 - 'icon' => 'eicon-h-align-left',
191 - ],
192 - 'horizontal' => [
193 - 'title' => esc_html__( 'Horizontal', 'elementor' ),
194 - 'icon' => 'eicon-v-align-top',
195 - ],
175 + 'horizontal' => esc_html__( 'Horizontal', 'elementor' ),
176 + 'vertical' => esc_html__( 'Vertical', 'elementor' ),
196 177 ],
197 - 'classes' => 'elementor-control-start-end',
198 178 'prefix_class' => 'elementor-tabs-view-',
199 179 'separator' => 'before',
200 180 ]
201 181 );
@@ -274,29 +254,16 @@
274 254 'navigation_width',
275 255 [
276 256 'label' => esc_html__( 'Navigation Width', 'elementor' ),
277 257 'type' => Controls_Manager::SLIDER,
278 - 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
279 258 'default' => [
280 259 'unit' => '%',
281 260 ],
282 261 'range' => [
283 - 'px' => [
284 - 'min' => 10,
285 - 'max' => 500,
286 - ],
287 262 '%' => [
288 263 'min' => 10,
289 264 'max' => 50,
290 265 ],
291 - 'em' => [
292 - 'min' => 1,
293 - 'max' => 50,
294 - ],
295 - 'rem' => [
296 - 'min' => 1,
297 - 'max' => 50,
298 - ],
299 266 ],
300 267 'selectors' => [
301 268 '{{WRAPPER}} .elementor-tabs-wrapper' => 'width: {{SIZE}}{{UNIT}}',
302 269 ],
@@ -422,10 +389,10 @@
422 389 [
423 390 'label' => esc_html__( 'Alignment', 'elementor' ),
424 391 'type' => Controls_Manager::CHOOSE,
425 392 'options' => [
426 - 'start' => [
427 - 'title' => esc_html__( 'Start', 'elementor' ),
393 + 'left' => [
394 + 'title' => esc_html__( 'Left', 'elementor' ),
428 395 'icon' => 'eicon-text-align-left',
429 396 ],
430 397 'center' => [
431 398 'title' => esc_html__( 'Center', 'elementor' ),
@@ -430,18 +397,13 @@
430 397 'center' => [
431 398 'title' => esc_html__( 'Center', 'elementor' ),
432 399 'icon' => 'eicon-text-align-center',
433 400 ],
434 - 'end' => [
435 - 'title' => esc_html__( 'End', 'elementor' ),
401 + 'right' => [
402 + 'title' => esc_html__( 'Right', 'elementor' ),
436 403 'icon' => 'eicon-text-align-right',
437 404 ],
438 405 ],
439 - 'classes' => 'elementor-control-start-end',
440 - 'selectors_dictionary' => [
441 - 'left' => is_rtl() ? 'end' : 'start',
442 - 'right' => is_rtl() ? 'start' : 'end',
443 - ],
444 406 'selectors' => [
445 407 '{{WRAPPER}} .elementor-tab-title' => 'text-align: {{VALUE}};',
446 408 ],
447 409 'condition' => [
@@ -585,37 +547,8 @@
585 547 *
586 548 * @since 2.9.0
587 549 * @access protected
588 550 */
589 - public function render_markdown(): string {
590 - $tabs = $this->get_settings_for_display( 'tabs' );
591 -
592 - if ( empty( $tabs ) ) {
593 - return '';
594 - }
595 -
596 - $sections = [];
597 -
598 - foreach ( $tabs as $item ) {
599 - $title = Utils::html_to_plain_text( $item['tab_title'] ?? '' );
600 - $content = \Elementor\Modules\MarkdownRender\Html_To_Markdown::convert( $item['tab_content'] ?? '' );
601 -
602 - if ( empty( $title ) && empty( $content ) ) {
603 - continue;
604 - }
605 -
606 - $section = '### ' . $title;
607 -
608 - if ( ! empty( $content ) ) {
609 - $section .= "\n\n" . $content;
610 - }
611 -
612 - $sections[] = $section;
613 - }
614 -
615 - return implode( "\n\n", $sections );
616 - }
617 -
618 551 protected function content_template() {
619 552 ?>
620 553 <div class="elementor-tabs" role="tablist" aria-orientation="vertical">
621 554 <# if ( settings.tabs ) {