PluginProbe
Elementor Website Builder – more than just a page builder / 3.1.0-dev2
Elementor Website Builder – more than just a page builder v3.1.0-dev2
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 +72 -223 4.1.33.1.0-dev2 View file →
@@ -42,9 +42,9 @@
42 42 *
43 43 * @return string Widget title.
44 44 */
45 45 public function get_title() {
46 - return esc_html__( 'Tabs', 'elementor' );
46 + return __( 'Tabs', 'elementor' );
47 47 }
48 48
49 49 /**
50 50 * Get widget icon.
@@ -73,50 +73,21 @@
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 77 /**
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 - public function show_in_panel(): bool {
96 - return ! Plugin::$instance->experiments->is_feature_active( 'nested-elements', true );
97 - }
98 -
99 - public function has_widget_inner_wrapper(): bool {
100 - return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
101 - }
102 -
103 - /**
104 78 * Register tabs widget controls.
105 79 *
106 80 * Adds different input fields to allow the user to change and customize the widget settings.
107 81 *
108 - * @since 3.1.0
82 + * @since 1.0.0
109 83 * @access protected
110 84 */
111 - protected function register_controls() {
112 - $start = is_rtl() ? 'end' : 'start';
113 - $end = is_rtl() ? 'start' : 'end';
114 -
85 + protected function _register_controls() {
115 86 $this->start_controls_section(
116 87 'section_tabs',
117 88 [
118 - 'label' => esc_html__( 'Tabs', 'elementor' ),
89 + 'label' => __( 'Tabs', 'elementor' ),
119 90 ]
120 91 );
121 92
122 93 $repeater = new Repeater();
@@ -123,12 +94,12 @@
123 94
124 95 $repeater->add_control(
125 96 'tab_title',
126 97 [
127 - 'label' => esc_html__( 'Title', 'elementor' ),
98 + 'label' => __( 'Title & Description', 'elementor' ),
128 99 'type' => Controls_Manager::TEXT,
129 - 'default' => esc_html__( 'Tab Title', 'elementor' ),
130 - 'placeholder' => esc_html__( 'Tab Title', 'elementor' ),
100 + 'default' => __( 'Tab Title', 'elementor' ),
101 + 'placeholder' => __( 'Tab Title', 'elementor' ),
131 102 'label_block' => true,
132 103 'dynamic' => [
133 104 'active' => true,
134 105 ],
@@ -137,42 +108,30 @@
137 108
138 109 $repeater->add_control(
139 110 'tab_content',
140 111 [
141 - 'label' => esc_html__( 'Content', 'elementor' ),
142 - 'default' => esc_html__( 'Tab Content', 'elementor' ),
143 - 'placeholder' => esc_html__( 'Tab Content', 'elementor' ),
112 + 'label' => __( 'Content', 'elementor' ),
113 + 'default' => __( 'Tab Content', 'elementor' ),
114 + 'placeholder' => __( 'Tab Content', 'elementor' ),
144 115 'type' => Controls_Manager::WYSIWYG,
116 + 'show_label' => false,
145 117 ]
146 118 );
147 119
148 - $is_nested_tabs_active = Plugin::$instance->widgets_manager->get_widget_types( 'nested-tabs' );
149 -
150 - if ( $is_nested_tabs_active ) {
151 - $this->add_deprecation_message(
152 - '3.8.0',
153 - esc_html__(
154 - 'You are currently editing a Tabs Widget in its old version. Any new tabs widget dragged into the canvas will be the new Tab widget, with the improved Nested capabilities.',
155 - 'elementor'
156 - ),
157 - 'nested-tabs'
158 - );
159 - }
160 -
161 120 $this->add_control(
162 121 'tabs',
163 122 [
164 - 'label' => esc_html__( 'Tabs Items', 'elementor' ),
123 + 'label' => __( 'Tabs Items', 'elementor' ),
165 124 'type' => Controls_Manager::REPEATER,
166 125 'fields' => $repeater->get_controls(),
167 126 'default' => [
168 127 [
169 - 'tab_title' => esc_html__( 'Tab #1', 'elementor' ),
170 - 'tab_content' => esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'elementor' ),
128 + 'tab_title' => __( 'Tab #1', 'elementor' ),
129 + 'tab_content' => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'elementor' ),
171 130 ],
172 131 [
173 - 'tab_title' => esc_html__( 'Tab #2', 'elementor' ),
174 - 'tab_content' => esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'elementor' ),
132 + 'tab_title' => __( 'Tab #2', 'elementor' ),
133 + 'tab_content' => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'elementor' ),
175 134 ],
176 135 ],
177 136 'title_field' => '{{{ tab_title }}}',
178 137 ]
@@ -178,24 +137,26 @@
178 137 ]
179 138 );
180 139
181 140 $this->add_control(
141 + 'view',
142 + [
143 + 'label' => __( 'View', 'elementor' ),
144 + 'type' => Controls_Manager::HIDDEN,
145 + 'default' => 'traditional',
146 + ]
147 + );
148 +
149 + $this->add_control(
182 150 'type',
183 151 [
184 - 'label' => esc_html__( 'Position', 'elementor' ),
185 - 'type' => Controls_Manager::CHOOSE,
152 + 'label' => __( 'Position', 'elementor' ),
153 + 'type' => Controls_Manager::SELECT,
186 154 'default' => 'horizontal',
187 155 '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 - ],
156 + 'horizontal' => __( 'Horizontal', 'elementor' ),
157 + 'vertical' => __( 'Vertical', 'elementor' ),
196 158 ],
197 - 'classes' => 'elementor-control-start-end',
198 159 'prefix_class' => 'elementor-tabs-view-',
199 160 'separator' => 'before',
200 161 ]
201 162 );
@@ -200,28 +161,28 @@
200 161 ]
201 162 );
202 163
203 164 $this->add_control(
204 - 'tabs_align_horizontal',
165 + 'tabs_align',
205 166 [
206 - 'label' => esc_html__( 'Alignment', 'elementor' ),
167 + 'label' => __( 'Alignment', 'elementor' ),
207 168 'type' => Controls_Manager::CHOOSE,
208 169 'options' => [
209 170 '' => [
210 - 'title' => esc_html__( 'Start', 'elementor' ),
211 - 'icon' => "eicon-align-$start-h",
171 + 'title' => __( 'Start', 'elementor' ),
172 + 'icon' => 'eicon-h-align-left',
212 173 ],
213 174 'center' => [
214 - 'title' => esc_html__( 'Center', 'elementor' ),
215 - 'icon' => 'eicon-align-center-h',
175 + 'title' => __( 'Center', 'elementor' ),
176 + 'icon' => 'eicon-h-align-center',
216 177 ],
217 178 'end' => [
218 - 'title' => esc_html__( 'End', 'elementor' ),
219 - 'icon' => "eicon-align-$end-h",
179 + 'title' => __( 'End', 'elementor' ),
180 + 'icon' => 'eicon-h-align-right',
220 181 ],
221 182 'stretch' => [
222 - 'title' => esc_html__( 'Stretch', 'elementor' ),
223 - 'icon' => 'eicon-align-stretch-h',
183 + 'title' => __( 'Justified', 'elementor' ),
184 + 'icon' => 'eicon-h-align-stretch',
224 185 ],
225 186 ],
226 187 'prefix_class' => 'elementor-tabs-alignment-',
227 188 'condition' => [
@@ -229,44 +190,14 @@
229 190 ],
230 191 ]
231 192 );
232 193
233 - $this->add_control(
234 - 'tabs_align_vertical',
235 - [
236 - 'label' => esc_html__( 'Alignment', 'elementor' ),
237 - 'type' => Controls_Manager::CHOOSE,
238 - 'options' => [
239 - '' => [
240 - 'title' => esc_html__( 'Start', 'elementor' ),
241 - 'icon' => 'eicon-align-start-v',
242 - ],
243 - 'center' => [
244 - 'title' => esc_html__( 'Center', 'elementor' ),
245 - 'icon' => 'eicon-align-center-v',
246 - ],
247 - 'end' => [
248 - 'title' => esc_html__( 'End', 'elementor' ),
249 - 'icon' => 'eicon-align-end-v',
250 - ],
251 - 'stretch' => [
252 - 'title' => esc_html__( 'Stretch', 'elementor' ),
253 - 'icon' => 'eicon-align-stretch-v',
254 - ],
255 - ],
256 - 'prefix_class' => 'elementor-tabs-alignment-',
257 - 'condition' => [
258 - 'type' => 'vertical',
259 - ],
260 - ]
261 - );
262 -
263 194 $this->end_controls_section();
264 195
265 196 $this->start_controls_section(
266 197 'section_tabs_style',
267 198 [
268 - 'label' => esc_html__( 'Tabs', 'elementor' ),
199 + 'label' => __( 'Tabs', 'elementor' ),
269 200 'tab' => Controls_Manager::TAB_STYLE,
270 201 ]
271 202 );
272 203
@@ -272,31 +203,18 @@
272 203
273 204 $this->add_control(
274 205 'navigation_width',
275 206 [
276 - 'label' => esc_html__( 'Navigation Width', 'elementor' ),
207 + 'label' => __( 'Navigation Width', 'elementor' ),
277 208 'type' => Controls_Manager::SLIDER,
278 - 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
279 209 'default' => [
280 210 'unit' => '%',
281 211 ],
282 212 'range' => [
283 - 'px' => [
284 - 'min' => 10,
285 - 'max' => 500,
286 - ],
287 213 '%' => [
288 214 'min' => 10,
289 215 'max' => 50,
290 216 ],
291 - 'em' => [
292 - 'min' => 1,
293 - 'max' => 50,
294 - ],
295 - 'rem' => [
296 - 'min' => 1,
297 - 'max' => 50,
298 - ],
299 217 ],
300 218 'selectors' => [
301 219 '{{WRAPPER}} .elementor-tabs-wrapper' => 'width: {{SIZE}}{{UNIT}}',
302 220 ],
@@ -308,21 +226,18 @@
308 226
309 227 $this->add_control(
310 228 'border_width',
311 229 [
312 - 'label' => esc_html__( 'Border Width', 'elementor' ),
230 + 'label' => __( 'Border Width', 'elementor' ),
313 231 'type' => Controls_Manager::SLIDER,
314 - 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
315 232 'default' => [
316 233 'size' => 1,
317 234 ],
318 235 'range' => [
319 236 'px' => [
320 - 'max' => 20,
237 + 'min' => 0,
238 + 'max' => 10,
321 239 ],
322 - 'em' => [
323 - 'max' => 2,
324 - ],
325 240 ],
326 241 'selectors' => [
327 242 '{{WRAPPER}} .elementor-tab-title, {{WRAPPER}} .elementor-tab-title:before, {{WRAPPER}} .elementor-tab-title:after, {{WRAPPER}} .elementor-tab-content, {{WRAPPER}} .elementor-tabs-content-wrapper' => 'border-width: {{SIZE}}{{UNIT}};',
328 243 ],
@@ -331,9 +246,9 @@
331 246
332 247 $this->add_control(
333 248 'border_color',
334 249 [
335 - 'label' => esc_html__( 'Border Color', 'elementor' ),
250 + 'label' => __( 'Border Color', 'elementor' ),
336 251 'type' => Controls_Manager::COLOR,
337 252 'selectors' => [
338 253 '{{WRAPPER}} .elementor-tab-mobile-title, {{WRAPPER}} .elementor-tab-desktop-title.elementor-active, {{WRAPPER}} .elementor-tab-title:before, {{WRAPPER}} .elementor-tab-title:after, {{WRAPPER}} .elementor-tab-content, {{WRAPPER}} .elementor-tabs-content-wrapper' => 'border-color: {{VALUE}};',
339 254 ],
@@ -342,9 +257,9 @@
342 257
343 258 $this->add_control(
344 259 'background_color',
345 260 [
346 - 'label' => esc_html__( 'Background Color', 'elementor' ),
261 + 'label' => __( 'Background Color', 'elementor' ),
347 262 'type' => Controls_Manager::COLOR,
348 263 'selectors' => [
349 264 '{{WRAPPER}} .elementor-tab-desktop-title.elementor-active' => 'background-color: {{VALUE}};',
350 265 '{{WRAPPER}} .elementor-tabs-content-wrapper' => 'background-color: {{VALUE}};',
@@ -354,9 +269,9 @@
354 269
355 270 $this->add_control(
356 271 'heading_title',
357 272 [
358 - 'label' => esc_html__( 'Title', 'elementor' ),
273 + 'label' => __( 'Title', 'elementor' ),
359 274 'type' => Controls_Manager::HEADING,
360 275 'separator' => 'before',
361 276 ]
362 277 );
@@ -363,12 +278,12 @@
363 278
364 279 $this->add_control(
365 280 'tab_color',
366 281 [
367 - 'label' => esc_html__( 'Color', 'elementor' ),
282 + 'label' => __( 'Color', 'elementor' ),
368 283 'type' => Controls_Manager::COLOR,
369 284 'selectors' => [
370 - '{{WRAPPER}} .elementor-tab-title, {{WRAPPER}} .elementor-tab-title a' => 'color: {{VALUE}}',
285 + '{{WRAPPER}} .elementor-tab-title' => 'color: {{VALUE}};',
371 286 ],
372 287 'global' => [
373 288 'default' => Global_Colors::COLOR_PRIMARY,
374 289 ],
@@ -377,13 +292,12 @@
377 292
378 293 $this->add_control(
379 294 'tab_active_color',
380 295 [
381 - 'label' => esc_html__( 'Active Color', 'elementor' ),
296 + 'label' => __( 'Active Color', 'elementor' ),
382 297 'type' => Controls_Manager::COLOR,
383 298 'selectors' => [
384 - '{{WRAPPER}} .elementor-tab-title.elementor-active,
385 - {{WRAPPER}} .elementor-tab-title.elementor-active a' => 'color: {{VALUE}}',
299 + '{{WRAPPER}} .elementor-tab-title.elementor-active' => 'color: {{VALUE}};',
386 300 ],
387 301 'global' => [
388 302 'default' => Global_Colors::COLOR_ACCENT,
389 303 ],
@@ -400,48 +314,27 @@
400 314 ],
401 315 ]
402 316 );
403 317
404 - $this->add_group_control(
405 - Group_Control_Text_Stroke::get_type(),
406 - [
407 - 'name' => 'text_stroke',
408 - 'selector' => '{{WRAPPER}} .elementor-tab-title',
409 - ]
410 - );
411 -
412 - $this->add_group_control(
413 - Group_Control_Text_Shadow::get_type(),
414 - [
415 - 'name' => 'title_shadow',
416 - 'selector' => '{{WRAPPER}} .elementor-tab-title',
417 - ]
418 - );
419 -
420 318 $this->add_control(
421 319 'title_align',
422 320 [
423 - 'label' => esc_html__( 'Alignment', 'elementor' ),
321 + 'label' => __( 'Alignment', 'elementor' ),
424 322 'type' => Controls_Manager::CHOOSE,
425 323 'options' => [
426 - 'start' => [
427 - 'title' => esc_html__( 'Start', 'elementor' ),
324 + 'left' => [
325 + 'title' => __( 'Left', 'elementor' ),
428 326 'icon' => 'eicon-text-align-left',
429 327 ],
430 328 'center' => [
431 - 'title' => esc_html__( 'Center', 'elementor' ),
329 + 'title' => __( 'Center', 'elementor' ),
432 330 'icon' => 'eicon-text-align-center',
433 331 ],
434 - 'end' => [
435 - 'title' => esc_html__( 'End', 'elementor' ),
332 + 'right' => [
333 + 'title' => __( 'Right', 'elementor' ),
436 334 'icon' => 'eicon-text-align-right',
437 335 ],
438 336 ],
439 - 'classes' => 'elementor-control-start-end',
440 - 'selectors_dictionary' => [
441 - 'left' => is_rtl() ? 'end' : 'start',
442 - 'right' => is_rtl() ? 'start' : 'end',
443 - ],
444 337 'selectors' => [
445 338 '{{WRAPPER}} .elementor-tab-title' => 'text-align: {{VALUE}};',
446 339 ],
447 340 'condition' => [
@@ -452,9 +345,9 @@
452 345
453 346 $this->add_control(
454 347 'heading_content',
455 348 [
456 - 'label' => esc_html__( 'Content', 'elementor' ),
349 + 'label' => __( 'Content', 'elementor' ),
457 350 'type' => Controls_Manager::HEADING,
458 351 'separator' => 'before',
459 352 ]
460 353 );
@@ -461,9 +354,9 @@
461 354
462 355 $this->add_control(
463 356 'content_color',
464 357 [
465 - 'label' => esc_html__( 'Color', 'elementor' ),
358 + 'label' => __( 'Color', 'elementor' ),
466 359 'type' => Controls_Manager::COLOR,
467 360 'selectors' => [
468 361 '{{WRAPPER}} .elementor-tab-content' => 'color: {{VALUE}};',
469 362 ],
@@ -483,16 +376,8 @@
483 376 ],
484 377 ]
485 378 );
486 379
487 - $this->add_group_control(
488 - Group_Control_Text_Shadow::get_type(),
489 - [
490 - 'name' => 'content_shadow',
491 - 'selector' => '{{WRAPPER}} .elementor-tab-content',
492 - ]
493 - );
494 -
495 380 $this->end_controls_section();
496 381 }
497 382
498 383 /**
@@ -507,33 +392,32 @@
507 392 $tabs = $this->get_settings_for_display( 'tabs' );
508 393
509 394 $id_int = substr( $this->get_id_int(), 0, 3 );
510 395
396 + $a11y_improvements_experiment = Plugin::$instance->experiments->is_feature_active( 'a11y_improvements' );
397 +
511 398 $this->add_render_attribute( 'elementor-tabs', 'class', 'elementor-tabs' );
512 399
513 400 ?>
514 - <div <?php $this->print_render_attribute_string( 'elementor-tabs' ); ?>>
401 + <div <?php echo $this->get_render_attribute_string( 'elementor-tabs' ); ?>>
515 402 <div class="elementor-tabs-wrapper" role="tablist" >
516 403 <?php
517 404 foreach ( $tabs as $index => $item ) :
518 405 $tab_count = $index + 1;
519 406 $tab_title_setting_key = $this->get_repeater_setting_key( 'tab_title', 'tabs', $index );
407 + $tab_title = $a11y_improvements_experiment ? $item['tab_title'] : '<a href="">' . $item['tab_title'] . '</a>';
520 408
521 409 $this->add_render_attribute( $tab_title_setting_key, [
522 410 'id' => 'elementor-tab-title-' . $id_int . $tab_count,
523 411 'class' => [ 'elementor-tab-title', 'elementor-tab-desktop-title' ],
524 - 'aria-selected' => 1 === $tab_count ? 'true' : 'false',
412 + 'aria-selected' => 1 == $tab_count ? 'true' : 'false',
525 413 'data-tab' => $tab_count,
526 414 'role' => 'tab',
527 - 'tabindex' => 1 === $tab_count ? '0' : '-1',
415 + 'tabindex' => 1 == $tab_count ? '0' : '-1',
528 416 'aria-controls' => 'elementor-tab-content-' . $id_int . $tab_count,
529 - 'aria-expanded' => 'false',
530 417 ] );
531 418 ?>
532 - <div <?php $this->print_render_attribute_string( $tab_title_setting_key ); ?>><?php
533 - // PHPCS - the main text of a widget should not be escaped.
534 - echo $item['tab_title']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
535 - ?></div>
419 + <div <?php echo $this->get_render_attribute_string( $tab_title_setting_key ); ?>><?php echo $tab_title; ?></div>
536 420 <?php endforeach; ?>
537 421 </div>
538 422 <div class="elementor-tabs-content-wrapper" role="tablist" aria-orientation="vertical">
539 423 <?php
@@ -538,9 +422,9 @@
538 422 <div class="elementor-tabs-content-wrapper" role="tablist" aria-orientation="vertical">
539 423 <?php
540 424 foreach ( $tabs as $index => $item ) :
541 425 $tab_count = $index + 1;
542 - $hidden = 1 === $tab_count ? 'false' : 'hidden';
426 + $hidden = 1 == $tab_count ? 'false' : 'hidden';
543 427 $tab_content_setting_key = $this->get_repeater_setting_key( 'tab_content', 'tabs', $index );
544 428
545 429 $tab_title_mobile_setting_key = $this->get_repeater_setting_key( 'tab_title_mobile', 'tabs', $tab_count );
546 430
@@ -555,24 +439,19 @@
555 439 ] );
556 440
557 441 $this->add_render_attribute( $tab_title_mobile_setting_key, [
558 442 'class' => [ 'elementor-tab-title', 'elementor-tab-mobile-title' ],
559 - 'aria-selected' => 1 === $tab_count ? 'true' : 'false',
443 + 'aria-selected' => 1 == $tab_count ? 'true' : 'false',
560 444 'data-tab' => $tab_count,
561 445 'role' => 'tab',
562 - 'tabindex' => 1 === $tab_count ? '0' : '-1',
446 + 'tabindex' => 1 == $tab_count ? '0' : '-1',
563 447 'aria-controls' => 'elementor-tab-content-' . $id_int . $tab_count,
564 - 'aria-expanded' => 'false',
565 448 ] );
566 449
567 450 $this->add_inline_editing_attributes( $tab_content_setting_key, 'advanced' );
568 451 ?>
569 - <div <?php $this->print_render_attribute_string( $tab_title_mobile_setting_key ); ?>><?php
570 - $this->print_unescaped_setting( 'tab_title', 'tabs', $index );
571 - ?></div>
572 - <div <?php $this->print_render_attribute_string( $tab_content_setting_key ); ?>><?php
573 - $this->print_text_editor( $item['tab_content'] );
574 - ?></div>
452 + <div <?php echo $this->get_render_attribute_string( $tab_title_mobile_setting_key ); ?>><?php echo $item['tab_title']; ?></div>
453 + <div <?php echo $this->get_render_attribute_string( $tab_content_setting_key ); ?>><?php echo $this->parse_text_editor( $item['tab_content'] ); ?></div>
575 454 <?php endforeach; ?>
576 455 </div>
577 456 </div>
578 457 <?php
@@ -585,37 +464,8 @@
585 464 *
586 465 * @since 2.9.0
587 466 * @access protected
588 467 */
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 468 protected function content_template() {
619 469 ?>
620 470 <div class="elementor-tabs" role="tablist" aria-orientation="vertical">
621 471 <# if ( settings.tabs ) {
@@ -630,11 +480,10 @@
630 480 'id': 'elementor-tab-title-' + tabUid,
631 481 'class': [ 'elementor-tab-title','elementor-tab-desktop-title' ],
632 482 'data-tab': tabCount,
633 483 'role': 'tab',
634 - 'tabindex': 1 === tabCount ? '0' : '-1',
484 + 'tabindex': 1 == tabCount ? '0' : '-1',
635 485 'aria-controls': 'elementor-tab-content-' + tabUid,
636 - 'aria-expanded': 'false',
637 486 } );
638 487 #>
639 488 <div {{{ view.getRenderAttributeString( tabTitleKey ) }}}>{{{ item.tab_title }}}</div>
640 489 <# } ); #>