$item ) :
$tab_count = $index + 1;
$tab_title_setting_key = $this->get_repeater_setting_key( 'tab_title', 'tabs', $index );
$tab_content_setting_key = $this->get_repeater_setting_key( 'tab_content', 'tabs', $index );
$this->add_render_attribute( $tab_title_setting_key, [
'id' => 'elementor-tab-title-' . $id_int . $tab_count,
'class' => [ 'elementor-tab-title' ],
'data-tab' => $tab_count,
'role' => 'tab',
'aria-controls' => 'elementor-tab-content-' . $id_int . $tab_count,
'aria-expanded' => 'false',
] );
$this->add_render_attribute( $tab_content_setting_key, [
'id' => 'elementor-tab-content-' . $id_int . $tab_count,
'class' => [ 'elementor-tab-content', 'elementor-clearfix' ],
'data-tab' => $tab_count,
'role' => 'tabpanel',
'aria-labelledby' => 'elementor-tab-title-' . $id_int . $tab_count,
] );
$this->add_inline_editing_attributes( $tab_content_setting_key, 'advanced' );
?>
'https://schema.org',
'@type' => 'FAQPage',
'mainEntity' => [],
];
foreach ( $settings['tabs'] as $index => $item ) {
$json['mainEntity'][] = [
'@type' => 'Question',
'name' => wp_strip_all_tags( $item['tab_title'] ),
'acceptedAnswer' => [
'@type' => 'Answer',
'text' => $this->parse_text_editor( $item['tab_content'] ),
],
];
}
?>
<#
if ( settings.tabs ) {
var tabindex = view.getIDInt().toString().substr( 0, 3 ),
iconHTML = elementor.helpers.renderIcon( view, settings.selected_icon, {}, 'i' , 'object' ),
iconActiveHTML = elementor.helpers.renderIcon( view, settings.selected_active_icon, {}, 'i' , 'object' ),
migrated = elementor.helpers.isIconMigrated( settings, 'selected_icon' );
_.each( settings.tabs, function( item, index ) {
var tabCount = index + 1,
tabTitleKey = view.getRepeaterSettingKey( 'tab_title', 'tabs', index ),
tabContentKey = view.getRepeaterSettingKey( 'tab_content', 'tabs', index );
view.addRenderAttribute( tabTitleKey, {
'id': 'elementor-tab-title-' + tabindex + tabCount,
'class': [ 'elementor-tab-title' ],
'tabindex': tabindex + tabCount,
'data-tab': tabCount,
'role': 'tab',
'aria-controls': 'elementor-tab-content-' + tabindex + tabCount,
'aria-expanded': 'false',
} );
view.addRenderAttribute( tabContentKey, {
'id': 'elementor-tab-content-' + tabindex + tabCount,
'class': [ 'elementor-tab-content', 'elementor-clearfix' ],
'data-tab': tabCount,
'role': 'tabpanel',
'aria-labelledby': 'elementor-tab-title-' + tabindex + tabCount
} );
view.addInlineEditingAttributes( tabContentKey, 'advanced' );
var titleHTMLTag = elementor.helpers.validateHTMLTag( settings.title_html_tag );
#>
<{{{ titleHTMLTag }}} {{{ view.getRenderAttributeString( tabTitleKey ) }}}>
<# if ( settings.icon || settings.selected_icon ) { #>
<# if ( iconHTML && iconHTML.rendered && ( ! settings.icon || migrated ) ) { #>
{{{ iconHTML.value }}}
{{{ iconActiveHTML.value }}}
<# } else { #>
<# } #>
<# } #>
{{{ item.tab_title }}}
{{{ titleHTMLTag }}}>
{{{ item.tab_content }}}
<#
} );
} #>