PluginProbe
Elementor Website Builder – more than just a page builder / 3.25.8
Elementor Website Builder – more than just a page builder v3.25.8
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
elementor / includes / widgets / toggle.php

toggle.php in Elementor Website Builder – more than just a page builder 3.25.8, at includes/widgets/toggle.php

740 lines 19.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor;
3
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit; // Exit if accessed directly.
6 }
7
8 use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
9 use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
10
11 /**
12 * Elementor toggle widget.
13 *
14 * Elementor widget that displays a collapsible display of content in an toggle
15 * style, allowing the user to open multiple items.
16 *
17 * @since 1.0.0
18 */
19 class Widget_Toggle extends Widget_Base {
20
21 /**
22 * Get widget name.
23 *
24 * Retrieve toggle widget name.
25 *
26 * @since 1.0.0
27 * @access public
28 *
29 * @return string Widget name.
30 */
31 public function get_name() {
32 return 'toggle';
33 }
34
35 /**
36 * Get widget title.
37 *
38 * Retrieve toggle widget title.
39 *
40 * @since 1.0.0
41 * @access public
42 *
43 * @return string Widget title.
44 */
45 public function get_title() {
46 return esc_html__( 'Toggle', 'elementor' );
47 }
48
49 /**
50 * Get widget icon.
51 *
52 * Retrieve toggle widget icon.
53 *
54 * @since 1.0.0
55 * @access public
56 *
57 * @return string Widget icon.
58 */
59 public function get_icon() {
60 return 'eicon-toggle';
61 }
62
63 /**
64 * Get widget keywords.
65 *
66 * Retrieve the list of keywords the widget belongs to.
67 *
68 * @since 2.1.0
69 * @access public
70 *
71 * @return array Widget keywords.
72 */
73 public function get_keywords() {
74 return [ 'tabs', 'accordion', 'toggle' ];
75 }
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-toggle' ];
93 }
94
95 /**
96 * Hide widget from panel.
97 *
98 * Hide the toggle widget from the panel if nested-accordion experiment is active.
99 *
100 * @since 3.15.0
101 * @return bool
102 */
103 public function show_in_panel(): bool {
104 return ! Plugin::$instance->experiments->is_feature_active( 'nested-elements', true );
105 }
106
107 /**
108 * Register toggle widget controls.
109 *
110 * Adds different input fields to allow the user to change and customize the widget settings.
111 *
112 * @since 3.1.0
113 * @access protected
114 */
115 protected function register_controls() {
116 $this->start_controls_section(
117 'section_toggle',
118 [
119 'label' => esc_html__( 'Toggle', 'elementor' ),
120 ]
121 );
122
123 $repeater = new Repeater();
124
125 $repeater->add_control(
126 'tab_title',
127 [
128 'label' => esc_html__( 'Title', 'elementor' ),
129 'type' => Controls_Manager::TEXT,
130 'default' => esc_html__( 'Toggle Title', 'elementor' ),
131 'label_block' => true,
132 'dynamic' => [
133 'active' => true,
134 ],
135 ]
136 );
137
138 $repeater->add_control(
139 'tab_content',
140 [
141 'label' => esc_html__( 'Content', 'elementor' ),
142 'type' => Controls_Manager::WYSIWYG,
143 'default' => esc_html__( 'Toggle Content', 'elementor' ),
144 'dynamic' => [
145 'active' => true,
146 ],
147 ]
148 );
149
150 if ( Plugin::$instance->widgets_manager->get_widget_types( 'nested-accordion' ) ) {
151 $this->add_deprecation_message(
152 '3.15.0',
153 esc_html__(
154 'You are currently editing a Toggle widget in its old version. Drag a new Accordion widget onto your page to use a newer version, providing nested capabilities.',
155 'elementor'
156 ),
157 'nested-accordion'
158 );
159 }
160
161 $this->add_control(
162 'tabs',
163 [
164 'label' => esc_html__( 'Toggle Items', 'elementor' ),
165 'type' => Controls_Manager::REPEATER,
166 'fields' => $repeater->get_controls(),
167 'default' => [
168 [
169 'tab_title' => esc_html__( 'Toggle #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' ),
171 ],
172 [
173 'tab_title' => esc_html__( 'Toggle #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' ),
175 ],
176 ],
177 'title_field' => '{{{ tab_title }}}',
178 ]
179 );
180
181 $this->add_control(
182 'selected_icon',
183 [
184 'label' => esc_html__( 'Icon', 'elementor' ),
185 'type' => Controls_Manager::ICONS,
186 'separator' => 'before',
187 'fa4compatibility' => 'icon',
188 'default' => [
189 'value' => 'fas fa-caret' . ( is_rtl() ? '-left' : '-right' ),
190 'library' => 'fa-solid',
191 ],
192 'recommended' => [
193 'fa-solid' => [
194 'chevron-down',
195 'angle-down',
196 'angle-double-down',
197 'caret-down',
198 'caret-square-down',
199 ],
200 'fa-regular' => [
201 'caret-square-down',
202 ],
203 ],
204 'label_block' => false,
205 'skin' => 'inline',
206 ]
207 );
208
209 $this->add_control(
210 'selected_active_icon',
211 [
212 'label' => esc_html__( 'Active Icon', 'elementor' ),
213 'type' => Controls_Manager::ICONS,
214 'fa4compatibility' => 'icon_active',
215 'default' => [
216 'value' => 'fas fa-caret-up',
217 'library' => 'fa-solid',
218 ],
219 'recommended' => [
220 'fa-solid' => [
221 'chevron-up',
222 'angle-up',
223 'angle-double-up',
224 'caret-up',
225 'caret-square-up',
226 ],
227 'fa-regular' => [
228 'caret-square-up',
229 ],
230 ],
231 'skin' => 'inline',
232 'label_block' => false,
233 'condition' => [
234 'selected_icon[value]!' => '',
235 ],
236 ]
237 );
238
239 $this->add_control(
240 'title_html_tag',
241 [
242 'label' => esc_html__( 'Title HTML Tag', 'elementor' ),
243 'type' => Controls_Manager::SELECT,
244 'options' => [
245 'h1' => 'H1',
246 'h2' => 'H2',
247 'h3' => 'H3',
248 'h4' => 'H4',
249 'h5' => 'H5',
250 'h6' => 'H6',
251 'div' => 'div',
252 ],
253 'default' => 'div',
254 'separator' => 'before',
255 ]
256 );
257
258 $this->add_control(
259 'faq_schema',
260 [
261 'label' => esc_html__( 'FAQ Schema', 'elementor' ),
262 'type' => Controls_Manager::SWITCHER,
263 'separator' => 'before',
264 ]
265 );
266
267 $this->end_controls_section();
268
269 $this->start_controls_section(
270 'section_toggle_style',
271 [
272 'label' => esc_html__( 'Toggle', 'elementor' ),
273 'tab' => Controls_Manager::TAB_STYLE,
274 ]
275 );
276
277 $this->add_control(
278 'border_width',
279 [
280 'label' => esc_html__( 'Border Width', 'elementor' ),
281 'type' => Controls_Manager::SLIDER,
282 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
283 'range' => [
284 'px' => [
285 'max' => 20,
286 ],
287 'em' => [
288 'max' => 2,
289 ],
290 ],
291 'selectors' => [
292 '{{WRAPPER}} .elementor-tab-title' => 'border-width: {{SIZE}}{{UNIT}};',
293 '{{WRAPPER}} .elementor-tab-content' => 'border-width: {{SIZE}}{{UNIT}};',
294 ],
295 ]
296 );
297
298 $this->add_control(
299 'border_color',
300 [
301 'label' => esc_html__( 'Border Color', 'elementor' ),
302 'type' => Controls_Manager::COLOR,
303 'selectors' => [
304 '{{WRAPPER}} .elementor-tab-content' => 'border-bottom-color: {{VALUE}};',
305 '{{WRAPPER}} .elementor-tab-title' => 'border-color: {{VALUE}};',
306 ],
307 ]
308 );
309
310 $this->add_responsive_control(
311 'space_between',
312 [
313 'label' => esc_html__( 'Space Between', 'elementor' ),
314 'type' => Controls_Manager::SLIDER,
315 'size_units' => [ 'px', 'em', 'rem', 'custom' ],
316 'range' => [
317 'px' => [
318 'max' => 100,
319 ],
320 'em' => [
321 'max' => 10,
322 ],
323 'rem' => [
324 'max' => 10,
325 ],
326 ],
327 'selectors' => [
328 '{{WRAPPER}} .elementor-toggle-item:not(:last-child)' => 'margin-bottom: {{SIZE}}{{UNIT}}',
329 ],
330 ]
331 );
332
333 $this->add_group_control(
334 Group_Control_Box_Shadow::get_type(),
335 [
336 'name' => 'box_shadow',
337 'selector' => '{{WRAPPER}} .elementor-toggle-item',
338 ]
339 );
340
341 $this->end_controls_section();
342
343 $this->start_controls_section(
344 'section_toggle_style_title',
345 [
346 'label' => esc_html__( 'Title', 'elementor' ),
347 'tab' => Controls_Manager::TAB_STYLE,
348 ]
349 );
350
351 $this->add_control(
352 'title_background',
353 [
354 'label' => esc_html__( 'Background', 'elementor' ),
355 'type' => Controls_Manager::COLOR,
356 'selectors' => [
357 '{{WRAPPER}} .elementor-tab-title' => 'background-color: {{VALUE}};',
358 ],
359 ]
360 );
361
362 // The title selector specificity is to override Theme Style
363 $this->add_control(
364 'title_color',
365 [
366 'label' => esc_html__( 'Color', 'elementor' ),
367 'type' => Controls_Manager::COLOR,
368 'selectors' => [
369 '{{WRAPPER}} .elementor-toggle-title, {{WRAPPER}} .elementor-toggle-icon' => 'color: {{VALUE}};',
370 '{{WRAPPER}} .elementor-toggle-icon svg' => 'fill: {{VALUE}};',
371 ],
372 'global' => [
373 'default' => Global_Colors::COLOR_PRIMARY,
374 ],
375 ]
376 );
377
378 $this->add_control(
379 'tab_active_color',
380 [
381 'label' => esc_html__( 'Active Color', 'elementor' ),
382 'type' => Controls_Manager::COLOR,
383 'selectors' => [
384 '{{WRAPPER}} .elementor-tab-title.elementor-active a, {{WRAPPER}} .elementor-tab-title.elementor-active .elementor-toggle-icon' => 'color: {{VALUE}};',
385 ],
386 'global' => [
387 'default' => Global_Colors::COLOR_ACCENT,
388 ],
389 ]
390 );
391
392 $this->add_group_control(
393 Group_Control_Typography::get_type(),
394 [
395 'name' => 'title_typography',
396 'selector' => '{{WRAPPER}} .elementor-toggle-title',
397 'global' => [
398 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
399 ],
400 ]
401 );
402
403 $this->add_group_control(
404 Group_Control_Text_Shadow::get_type(),
405 [
406 'name' => 'title_shadow',
407 'selector' => '{{WRAPPER}} .elementor-toggle-title',
408 ]
409 );
410
411 $this->add_responsive_control(
412 'title_padding',
413 [
414 'label' => esc_html__( 'Padding', 'elementor' ),
415 'type' => Controls_Manager::DIMENSIONS,
416 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
417 'selectors' => [
418 '{{WRAPPER}} .elementor-tab-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
419 ],
420 ]
421 );
422
423 $this->end_controls_section();
424
425 $this->start_controls_section(
426 'section_toggle_style_icon',
427 [
428 'label' => esc_html__( 'Icon', 'elementor' ),
429 'tab' => Controls_Manager::TAB_STYLE,
430 'condition' => [
431 'selected_icon[value]!' => '',
432 ],
433 ]
434 );
435
436 $this->add_control(
437 'icon_align',
438 [
439 'label' => esc_html__( 'Alignment', 'elementor' ),
440 'type' => Controls_Manager::CHOOSE,
441 'options' => [
442 'left' => [
443 'title' => esc_html__( 'Start', 'elementor' ),
444 'icon' => 'eicon-h-align-left',
445 ],
446 'right' => [
447 'title' => esc_html__( 'End', 'elementor' ),
448 'icon' => 'eicon-h-align-right',
449 ],
450 ],
451 'default' => is_rtl() ? 'right' : 'left',
452 'toggle' => false,
453 ]
454 );
455
456 $this->add_control(
457 'icon_color',
458 [
459 'label' => esc_html__( 'Color', 'elementor' ),
460 'type' => Controls_Manager::COLOR,
461 'selectors' => [
462 '{{WRAPPER}} .elementor-tab-title .elementor-toggle-icon i:before' => 'color: {{VALUE}};',
463 '{{WRAPPER}} .elementor-tab-title .elementor-toggle-icon svg' => 'fill: {{VALUE}};',
464 ],
465 ]
466 );
467
468 $this->add_control(
469 'icon_active_color',
470 [
471 'label' => esc_html__( 'Active Color', 'elementor' ),
472 'type' => Controls_Manager::COLOR,
473 'selectors' => [
474 '{{WRAPPER}} .elementor-tab-title.elementor-active .elementor-toggle-icon i:before' => 'color: {{VALUE}};',
475 '{{WRAPPER}} .elementor-tab-title.elementor-active .elementor-toggle-icon svg' => 'fill: {{VALUE}};',
476 ],
477 ]
478 );
479
480 $this->add_responsive_control(
481 'icon_space',
482 [
483 'label' => esc_html__( 'Spacing', 'elementor' ),
484 'type' => Controls_Manager::SLIDER,
485 'size_units' => [ 'px', 'em', 'rem', 'custom' ],
486 'range' => [
487 'px' => [
488 'max' => 100,
489 ],
490 'em' => [
491 'max' => 10,
492 ],
493 'rem' => [
494 'max' => 10,
495 ],
496 ],
497 'selectors' => [
498 '{{WRAPPER}} .elementor-toggle-icon.elementor-toggle-icon-left' => 'margin-right: {{SIZE}}{{UNIT}};',
499 '{{WRAPPER}} .elementor-toggle-icon.elementor-toggle-icon-right' => 'margin-left: {{SIZE}}{{UNIT}};',
500 ],
501 ]
502 );
503
504 $this->end_controls_section();
505
506 $this->start_controls_section(
507 'section_toggle_style_content',
508 [
509 'label' => esc_html__( 'Content', 'elementor' ),
510 'tab' => Controls_Manager::TAB_STYLE,
511 ]
512 );
513
514 $this->add_control(
515 'content_background_color',
516 [
517 'label' => esc_html__( 'Background', 'elementor' ),
518 'type' => Controls_Manager::COLOR,
519 'selectors' => [
520 '{{WRAPPER}} .elementor-tab-content' => 'background-color: {{VALUE}};',
521 ],
522 ]
523 );
524
525 $this->add_control(
526 'content_color',
527 [
528 'label' => esc_html__( 'Color', 'elementor' ),
529 'type' => Controls_Manager::COLOR,
530 'selectors' => [
531 '{{WRAPPER}} .elementor-tab-content' => 'color: {{VALUE}};',
532 ],
533 'global' => [
534 'default' => Global_Colors::COLOR_TEXT,
535 ],
536 ]
537 );
538
539 $this->add_group_control(
540 Group_Control_Typography::get_type(),
541 [
542 'name' => 'content_typography',
543 'selector' => '{{WRAPPER}} .elementor-tab-content',
544 'global' => [
545 'default' => Global_Typography::TYPOGRAPHY_TEXT,
546 ],
547 ]
548 );
549
550 $this->add_group_control(
551 Group_Control_Text_Shadow::get_type(),
552 [
553 'name' => 'content_shadow',
554 'selector' => '{{WRAPPER}} .elementor-tab-content',
555 ]
556 );
557
558 $this->add_responsive_control(
559 'content_padding',
560 [
561 'label' => esc_html__( 'Padding', 'elementor' ),
562 'type' => Controls_Manager::DIMENSIONS,
563 'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
564 'selectors' => [
565 '{{WRAPPER}} .elementor-tab-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
566 ],
567 ]
568 );
569
570 $this->end_controls_section();
571 }
572
573 /**
574 * Render toggle widget output on the frontend.
575 *
576 * Written in PHP and used to generate the final HTML.
577 *
578 * @since 1.0.0
579 * @access protected
580 */
581 protected function render() {
582 $settings = $this->get_settings_for_display();
583
584 $id_int = substr( $this->get_id_int(), 0, 3 );
585 $migrated = isset( $settings['__fa4_migrated']['selected_icon'] );
586
587 if ( ! isset( $settings['icon'] ) && ! Icons_Manager::is_migration_allowed() ) {
588 // @todo: remove when deprecated
589 // added as bc in 2.6
590 // add old default
591 $settings['icon'] = 'fa fa-caret' . ( is_rtl() ? '-left' : '-right' );
592 $settings['icon_active'] = 'fa fa-caret-up';
593 $settings['icon_align'] = $this->get_settings( 'icon_align' );
594 }
595
596 $is_new = empty( $settings['icon'] ) && Icons_Manager::is_migration_allowed();
597 $has_icon = ( ! $is_new || ! empty( $settings['selected_icon']['value'] ) );
598
599 ?>
600 <div class="elementor-toggle">
601 <?php
602 foreach ( $settings['tabs'] as $index => $item ) :
603 $tab_count = $index + 1;
604
605 $tab_title_setting_key = $this->get_repeater_setting_key( 'tab_title', 'tabs', $index );
606
607 $tab_content_setting_key = $this->get_repeater_setting_key( 'tab_content', 'tabs', $index );
608
609 $this->add_render_attribute( $tab_title_setting_key, [
610 'id' => 'elementor-tab-title-' . $id_int . $tab_count,
611 'class' => [ 'elementor-tab-title' ],
612 'data-tab' => $tab_count,
613 'role' => 'button',
614 'aria-controls' => 'elementor-tab-content-' . $id_int . $tab_count,
615 'aria-expanded' => 'false',
616 ] );
617
618 $this->add_render_attribute( $tab_content_setting_key, [
619 'id' => 'elementor-tab-content-' . $id_int . $tab_count,
620 'class' => [ 'elementor-tab-content', 'elementor-clearfix' ],
621 'data-tab' => $tab_count,
622 'role' => 'region',
623 'aria-labelledby' => 'elementor-tab-title-' . $id_int . $tab_count,
624 ] );
625
626 $this->add_inline_editing_attributes( $tab_content_setting_key, 'advanced' );
627 ?>
628 <div class="elementor-toggle-item">
629 <<?php Utils::print_validated_html_tag( $settings['title_html_tag'] ); ?> <?php $this->print_render_attribute_string( $tab_title_setting_key ); ?>>
630 <?php if ( $has_icon ) : ?>
631 <span class="elementor-toggle-icon elementor-toggle-icon-<?php echo esc_attr( $settings['icon_align'] ); ?>" aria-hidden="true">
632 <?php
633 if ( $is_new || $migrated ) { ?>
634 <span class="elementor-toggle-icon-closed"><?php Icons_Manager::render_icon( $settings['selected_icon'] ); ?></span>
635 <span class="elementor-toggle-icon-opened"><?php Icons_Manager::render_icon( $settings['selected_active_icon'], [ 'class' => 'elementor-toggle-icon-opened' ] ); ?></span>
636 <?php } else { ?>
637 <i class="elementor-toggle-icon-closed <?php echo esc_attr( $settings['icon'] ); ?>"></i>
638 <i class="elementor-toggle-icon-opened <?php echo esc_attr( $settings['icon_active'] ); ?>"></i>
639 <?php } ?>
640 </span>
641 <?php endif; ?>
642 <a class="elementor-toggle-title" tabindex="0"><?php $this->print_unescaped_setting( 'tab_title', 'tabs', $index ); ?></a>
643 </<?php Utils::print_validated_html_tag( $settings['title_html_tag'] ); ?>>
644
645 <div <?php $this->print_render_attribute_string( $tab_content_setting_key ); ?>><?php Utils::print_unescaped_internal_string( $this->parse_text_editor( $item['tab_content'] ) ); ?></div>
646 </div>
647 <?php endforeach; ?>
648 <?php
649 if ( isset( $settings['faq_schema'] ) && 'yes' === $settings['faq_schema'] ) {
650 $json = [
651 '@context' => 'https://schema.org',
652 '@type' => 'FAQPage',
653 'mainEntity' => [],
654 ];
655
656 foreach ( $settings['tabs'] as $index => $item ) {
657 $json['mainEntity'][] = [
658 '@type' => 'Question',
659 'name' => wp_strip_all_tags( $item['tab_title'] ),
660 'acceptedAnswer' => [
661 '@type' => 'Answer',
662 'text' => $this->parse_text_editor( $item['tab_content'] ),
663 ],
664 ];
665 }
666 ?>
667 <script type="application/ld+json"><?php echo wp_json_encode( $json ); ?></script>
668 <?php } ?>
669 </div>
670 <?php
671 }
672
673 /**
674 * Render toggle widget output in the editor.
675 *
676 * Written as a Backbone JavaScript template and used to generate the live preview.
677 *
678 * @since 2.9.0
679 * @access protected
680 */
681 protected function content_template() {
682 ?>
683 <div class="elementor-toggle">
684 <#
685 if ( settings.tabs ) {
686 var tabindex = view.getIDInt().toString().substr( 0, 3 ),
687 iconHTML = elementor.helpers.renderIcon( view, settings.selected_icon, {}, 'i' , 'object' ),
688 iconActiveHTML = elementor.helpers.renderIcon( view, settings.selected_active_icon, {}, 'i' , 'object' ),
689 migrated = elementor.helpers.isIconMigrated( settings, 'selected_icon' ),
690 titleHTMLTag = elementor.helpers.validateHTMLTag( settings.title_html_tag );
691
692 _.each( settings.tabs, function( item, index ) {
693 var tabCount = index + 1,
694 tabTitleKey = view.getRepeaterSettingKey( 'tab_title', 'tabs', index ),
695 tabContentKey = view.getRepeaterSettingKey( 'tab_content', 'tabs', index );
696
697 view.addRenderAttribute( tabTitleKey, {
698 'id': 'elementor-tab-title-' + tabindex + tabCount,
699 'class': [ 'elementor-tab-title' ],
700 'data-tab': tabCount,
701 'role': 'button',
702 'aria-controls': 'elementor-tab-content-' + tabindex + tabCount,
703 'aria-expanded': 'false',
704 } );
705
706 view.addRenderAttribute( tabContentKey, {
707 'id': 'elementor-tab-content-' + tabindex + tabCount,
708 'class': [ 'elementor-tab-content', 'elementor-clearfix' ],
709 'data-tab': tabCount,
710 'role': 'region',
711 'aria-labelledby': 'elementor-tab-title-' + tabindex + tabCount
712 } );
713
714 view.addInlineEditingAttributes( tabContentKey, 'advanced' );
715 #>
716 <div class="elementor-toggle-item">
717 <{{{ titleHTMLTag }}} {{{ view.getRenderAttributeString( tabTitleKey ) }}}>
718 <# if ( settings.icon || settings.selected_icon ) { #>
719 <span class="elementor-toggle-icon elementor-toggle-icon-{{ settings.icon_align }}" aria-hidden="true">
720 <# if ( iconHTML && iconHTML.rendered && ( ! settings.icon || migrated ) ) { #>
721 <span class="elementor-toggle-icon-closed">{{{ iconHTML.value }}}</span>
722 <span class="elementor-toggle-icon-opened">{{{ iconActiveHTML.value }}}</span>
723 <# } else { #>
724 <i class="elementor-toggle-icon-closed {{ settings.icon }}"></i>
725 <i class="elementor-toggle-icon-opened {{ settings.icon_active }}"></i>
726 <# } #>
727 </span>
728 <# } #>
729 <a class="elementor-toggle-title" tabindex="0">{{{ item.tab_title }}}</a>
730 </{{{ titleHTMLTag }}}>
731 <div {{{ view.getRenderAttributeString( tabContentKey ) }}}>{{{ item.tab_content }}}</div>
732 </div>
733 <#
734 } );
735 } #>
736 </div>
737 <?php
738 }
739 }
740