Edit File by line
/home/zeestwma/ceyloniy.../wp-conte.../plugins/elemento.../modules/nested-t.../widgets
File: nested-tabs.php
<?php
[0] Fix | Delete
namespace Elementor\Modules\NestedTabs\Widgets;
[1] Fix | Delete
[2] Fix | Delete
use Elementor\Controls_Manager;
[3] Fix | Delete
use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
[4] Fix | Delete
use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
[5] Fix | Delete
use Elementor\Group_Control_Background;
[6] Fix | Delete
use Elementor\Group_Control_Border;
[7] Fix | Delete
use Elementor\Group_Control_Box_Shadow;
[8] Fix | Delete
use Elementor\Group_Control_Text_Shadow;
[9] Fix | Delete
use Elementor\Group_Control_Text_Stroke;
[10] Fix | Delete
use Elementor\Group_Control_Typography;
[11] Fix | Delete
use Elementor\Icons_Manager;
[12] Fix | Delete
use Elementor\Modules\NestedElements\Base\Widget_Nested_Base;
[13] Fix | Delete
use Elementor\Modules\NestedElements\Controls\Control_Nested_Repeater;
[14] Fix | Delete
use Elementor\Plugin;
[15] Fix | Delete
use Elementor\Repeater;
[16] Fix | Delete
[17] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[18] Fix | Delete
exit; // Exit if accessed directly.
[19] Fix | Delete
}
[20] Fix | Delete
[21] Fix | Delete
class NestedTabs extends Widget_Nested_Base {
[22] Fix | Delete
[23] Fix | Delete
private $tab_item_settings = [];
[24] Fix | Delete
private $optimized_markup = null;
[25] Fix | Delete
private $widget_container_selector = '';
[26] Fix | Delete
[27] Fix | Delete
public function get_name() {
[28] Fix | Delete
return 'nested-tabs';
[29] Fix | Delete
}
[30] Fix | Delete
[31] Fix | Delete
public function get_title() {
[32] Fix | Delete
return esc_html__( 'Tabs', 'elementor' );
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
public function get_icon() {
[36] Fix | Delete
return 'eicon-tabs';
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
public function get_keywords() {
[40] Fix | Delete
return [ 'nested', 'tabs', 'accordion', 'toggle' ];
[41] Fix | Delete
}
[42] Fix | Delete
[43] Fix | Delete
public function get_style_depends(): array {
[44] Fix | Delete
return [ 'widget-nested-tabs' ];
[45] Fix | Delete
}
[46] Fix | Delete
[47] Fix | Delete
public function has_widget_inner_wrapper(): bool {
[48] Fix | Delete
return ! Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
[49] Fix | Delete
}
[50] Fix | Delete
[51] Fix | Delete
public function show_in_panel(): bool {
[52] Fix | Delete
return Plugin::$instance->experiments->is_feature_active( 'nested-elements', true );
[53] Fix | Delete
}
[54] Fix | Delete
[55] Fix | Delete
protected function tab_content_container( int $index ) {
[56] Fix | Delete
return [
[57] Fix | Delete
'elType' => 'container',
[58] Fix | Delete
'settings' => [
[59] Fix | Delete
'_title' => sprintf(
[60] Fix | Delete
/* translators: %d: Tab index. */
[61] Fix | Delete
__( 'Tab #%d', 'elementor' ),
[62] Fix | Delete
$index
[63] Fix | Delete
),
[64] Fix | Delete
'content_width' => 'full',
[65] Fix | Delete
],
[66] Fix | Delete
];
[67] Fix | Delete
}
[68] Fix | Delete
[69] Fix | Delete
protected function get_default_children_elements() {
[70] Fix | Delete
return [
[71] Fix | Delete
$this->tab_content_container( 1 ),
[72] Fix | Delete
$this->tab_content_container( 2 ),
[73] Fix | Delete
$this->tab_content_container( 3 ),
[74] Fix | Delete
];
[75] Fix | Delete
}
[76] Fix | Delete
[77] Fix | Delete
protected function get_default_repeater_title_setting_key() {
[78] Fix | Delete
return 'tab_title';
[79] Fix | Delete
}
[80] Fix | Delete
[81] Fix | Delete
protected function get_default_children_title() {
[82] Fix | Delete
/* translators: %d: Tab index. */
[83] Fix | Delete
return esc_html__( 'Tab #%d', 'elementor' );
[84] Fix | Delete
}
[85] Fix | Delete
[86] Fix | Delete
protected function get_default_children_placeholder_selector() {
[87] Fix | Delete
return '.e-n-tabs-content';
[88] Fix | Delete
}
[89] Fix | Delete
[90] Fix | Delete
protected function get_html_wrapper_class() {
[91] Fix | Delete
return 'elementor-widget-n-tabs';
[92] Fix | Delete
}
[93] Fix | Delete
[94] Fix | Delete
protected function register_controls() {
[95] Fix | Delete
if ( null === $this->optimized_markup ) {
[96] Fix | Delete
$this->optimized_markup = Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' ) && ! $this->has_widget_inner_wrapper();
[97] Fix | Delete
$this->widget_container_selector = $this->optimized_markup ? '' : ' > .elementor-widget-container';
[98] Fix | Delete
}
[99] Fix | Delete
[100] Fix | Delete
$start = is_rtl() ? 'right' : 'left';
[101] Fix | Delete
$end = is_rtl() ? 'left' : 'right';
[102] Fix | Delete
$start_logical = is_rtl() ? 'end' : 'start';
[103] Fix | Delete
$end_logical = is_rtl() ? 'start' : 'end';
[104] Fix | Delete
$heading_selector_non_touch_device = "{{WRAPPER}}.elementor-widget-n-tabs{$this->widget_container_selector} > .e-n-tabs[data-touch-mode='false'] > .e-n-tabs-heading";
[105] Fix | Delete
$heading_selector_touch_device = "{{WRAPPER}}.elementor-widget-n-tabs{$this->widget_container_selector} > .e-n-tabs[data-touch-mode='true'] > .e-n-tabs-heading";
[106] Fix | Delete
$heading_selector = "{{WRAPPER}}.elementor-widget-n-tabs{$this->widget_container_selector} > .e-n-tabs > .e-n-tabs-heading";
[107] Fix | Delete
$content_selector = ":where( {{WRAPPER}}.elementor-widget-n-tabs{$this->widget_container_selector} > .e-n-tabs > .e-n-tabs-content ) > .e-con";
[108] Fix | Delete
[109] Fix | Delete
$this->start_controls_section( 'section_tabs', [
[110] Fix | Delete
'label' => esc_html__( 'Tabs', 'elementor' ),
[111] Fix | Delete
] );
[112] Fix | Delete
[113] Fix | Delete
$repeater = new Repeater();
[114] Fix | Delete
[115] Fix | Delete
$repeater->add_control( 'tab_title', [
[116] Fix | Delete
'label' => esc_html__( 'Title', 'elementor' ),
[117] Fix | Delete
'type' => Controls_Manager::TEXT,
[118] Fix | Delete
'default' => esc_html__( 'Tab Title', 'elementor' ),
[119] Fix | Delete
'placeholder' => esc_html__( 'Tab Title', 'elementor' ),
[120] Fix | Delete
'label_block' => true,
[121] Fix | Delete
'dynamic' => [
[122] Fix | Delete
'active' => true,
[123] Fix | Delete
],
[124] Fix | Delete
] );
[125] Fix | Delete
[126] Fix | Delete
$repeater->add_control(
[127] Fix | Delete
'tab_icon',
[128] Fix | Delete
[
[129] Fix | Delete
'label' => esc_html__( 'Icon', 'elementor' ),
[130] Fix | Delete
'type' => Controls_Manager::ICONS,
[131] Fix | Delete
'fa4compatibility' => 'icon',
[132] Fix | Delete
'skin' => 'inline',
[133] Fix | Delete
'label_block' => false,
[134] Fix | Delete
]
[135] Fix | Delete
);
[136] Fix | Delete
[137] Fix | Delete
$repeater->add_control(
[138] Fix | Delete
'tab_icon_active',
[139] Fix | Delete
[
[140] Fix | Delete
'label' => esc_html__( 'Active Icon', 'elementor' ),
[141] Fix | Delete
'type' => Controls_Manager::ICONS,
[142] Fix | Delete
'fa4compatibility' => 'icon',
[143] Fix | Delete
'skin' => 'inline',
[144] Fix | Delete
'label_block' => false,
[145] Fix | Delete
'condition' => [
[146] Fix | Delete
'tab_icon[value]!' => '',
[147] Fix | Delete
],
[148] Fix | Delete
]
[149] Fix | Delete
);
[150] Fix | Delete
[151] Fix | Delete
$repeater->add_control(
[152] Fix | Delete
'element_id',
[153] Fix | Delete
[
[154] Fix | Delete
'label' => esc_html__( 'CSS ID', 'elementor' ),
[155] Fix | Delete
'type' => Controls_Manager::TEXT,
[156] Fix | Delete
'default' => '',
[157] Fix | Delete
'ai' => [
[158] Fix | Delete
'active' => false,
[159] Fix | Delete
],
[160] Fix | Delete
'dynamic' => [
[161] Fix | Delete
'active' => true,
[162] Fix | Delete
],
[163] Fix | Delete
'title' => esc_html__( 'Add your custom id WITHOUT the Pound key. e.g: my-id', 'elementor' ),
[164] Fix | Delete
'style_transfer' => false,
[165] Fix | Delete
'classes' => 'elementor-control-direction-ltr',
[166] Fix | Delete
]
[167] Fix | Delete
);
[168] Fix | Delete
[169] Fix | Delete
$this->add_control( 'tabs', [
[170] Fix | Delete
'label' => esc_html__( 'Tabs Items', 'elementor' ),
[171] Fix | Delete
'type' => Control_Nested_Repeater::CONTROL_TYPE,
[172] Fix | Delete
'fields' => $repeater->get_controls(),
[173] Fix | Delete
'default' => [
[174] Fix | Delete
[
[175] Fix | Delete
'tab_title' => esc_html__( 'Tab #1', 'elementor' ),
[176] Fix | Delete
],
[177] Fix | Delete
[
[178] Fix | Delete
'tab_title' => esc_html__( 'Tab #2', 'elementor' ),
[179] Fix | Delete
],
[180] Fix | Delete
[
[181] Fix | Delete
'tab_title' => esc_html__( 'Tab #3', 'elementor' ),
[182] Fix | Delete
],
[183] Fix | Delete
],
[184] Fix | Delete
'title_field' => '{{{ tab_title }}}',
[185] Fix | Delete
'button_text' => esc_html__( 'Add Tab', 'elementor' ),
[186] Fix | Delete
] );
[187] Fix | Delete
[188] Fix | Delete
$styling_block_start = '--n-tabs-direction: column; --n-tabs-heading-direction: row; --n-tabs-heading-width: initial; --n-tabs-title-flex-basis: content; --n-tabs-title-flex-shrink: 0;';
[189] Fix | Delete
$styling_block_end = '--n-tabs-direction: column-reverse; --n-tabs-heading-direction: row; --n-tabs-heading-width: initial; --n-tabs-title-flex-basis: content; --n-tabs-title-flex-shrink: 0';
[190] Fix | Delete
$styling_inline_end = '--n-tabs-direction: row-reverse; --n-tabs-heading-direction: column; --n-tabs-heading-width: 240px; --n-tabs-title-flex-basis: initial; --n-tabs-title-flex-shrink: initial;';
[191] Fix | Delete
$styling_inline_start = '--n-tabs-direction: row; --n-tabs-heading-direction: column; --n-tabs-heading-width: 240px; --n-tabs-title-flex-basis: initial; --n-tabs-title-flex-shrink: initial;';
[192] Fix | Delete
[193] Fix | Delete
$this->add_responsive_control( 'tabs_direction', [
[194] Fix | Delete
'label' => esc_html__( 'Direction', 'elementor' ),
[195] Fix | Delete
'type' => Controls_Manager::CHOOSE,
[196] Fix | Delete
'options' => [
[197] Fix | Delete
'block-start' => [
[198] Fix | Delete
'title' => esc_html__( 'Above', 'elementor' ),
[199] Fix | Delete
'icon' => 'eicon-v-align-top',
[200] Fix | Delete
],
[201] Fix | Delete
'block-end' => [
[202] Fix | Delete
'title' => esc_html__( 'Below', 'elementor' ),
[203] Fix | Delete
'icon' => 'eicon-v-align-bottom',
[204] Fix | Delete
],
[205] Fix | Delete
'inline-end' => [
[206] Fix | Delete
'title' => esc_html__( 'After', 'elementor' ),
[207] Fix | Delete
'icon' => 'eicon-h-align-' . $end,
[208] Fix | Delete
],
[209] Fix | Delete
'inline-start' => [
[210] Fix | Delete
'title' => esc_html__( 'Before', 'elementor' ),
[211] Fix | Delete
'icon' => 'eicon-h-align-' . $start,
[212] Fix | Delete
],
[213] Fix | Delete
],
[214] Fix | Delete
'separator' => 'before',
[215] Fix | Delete
'selectors_dictionary' => [
[216] Fix | Delete
'block-start' => $styling_block_start,
[217] Fix | Delete
'block-end' => $styling_block_end,
[218] Fix | Delete
'inline-end' => $styling_inline_end,
[219] Fix | Delete
'inline-start' => $styling_inline_start,
[220] Fix | Delete
// Styling duplication for BC reasons.
[221] Fix | Delete
'top' => $styling_block_start,
[222] Fix | Delete
'bottom' => $styling_block_end,
[223] Fix | Delete
'end' => $styling_inline_end,
[224] Fix | Delete
'start' => $styling_inline_start,
[225] Fix | Delete
],
[226] Fix | Delete
'selectors' => [
[227] Fix | Delete
'{{WRAPPER}}' => '{{VALUE}}',
[228] Fix | Delete
],
[229] Fix | Delete
'control_type' => 'content',
[230] Fix | Delete
] );
[231] Fix | Delete
[232] Fix | Delete
$this->add_responsive_control( 'tabs_justify_horizontal', [
[233] Fix | Delete
'label' => esc_html__( 'Justify', 'elementor' ),
[234] Fix | Delete
'type' => Controls_Manager::CHOOSE,
[235] Fix | Delete
'options' => [
[236] Fix | Delete
'start' => [
[237] Fix | Delete
'title' => esc_html__( 'Start', 'elementor' ),
[238] Fix | Delete
'icon' => "eicon-align-$start_logical-h",
[239] Fix | Delete
],
[240] Fix | Delete
'center' => [
[241] Fix | Delete
'title' => esc_html__( 'Center', 'elementor' ),
[242] Fix | Delete
'icon' => 'eicon-align-center-h',
[243] Fix | Delete
],
[244] Fix | Delete
'end' => [
[245] Fix | Delete
'title' => esc_html__( 'End', 'elementor' ),
[246] Fix | Delete
'icon' => "eicon-align-$end_logical-h",
[247] Fix | Delete
],
[248] Fix | Delete
'stretch' => [
[249] Fix | Delete
'title' => esc_html__( 'Stretch', 'elementor' ),
[250] Fix | Delete
'icon' => 'eicon-align-stretch-h',
[251] Fix | Delete
],
[252] Fix | Delete
],
[253] Fix | Delete
'selectors_dictionary' => [
[254] Fix | Delete
'start' => '--n-tabs-heading-justify-content: flex-start; --n-tabs-title-width: initial; --n-tabs-title-height: initial; --n-tabs-title-align-items: center; --n-tabs-title-flex-grow: 0;',
[255] Fix | Delete
'center' => '--n-tabs-heading-justify-content: center; --n-tabs-title-width: initial; --n-tabs-title-height: initial; --n-tabs-title-align-items: center; --n-tabs-title-flex-grow: 0;',
[256] Fix | Delete
'end' => '--n-tabs-heading-justify-content: flex-end; --n-tabs-title-width: initial; --n-tabs-title-height: initial; --n-tabs-title-align-items: center; --n-tabs-title-flex-grow: 0;',
[257] Fix | Delete
'stretch' => '--n-tabs-heading-justify-content: initial; --n-tabs-title-width: 100%; --n-tabs-title-height: initial; --n-tabs-title-align-items: center; --n-tabs-title-flex-grow: 1;',
[258] Fix | Delete
],
[259] Fix | Delete
'selectors' => [
[260] Fix | Delete
'{{WRAPPER}}' => '{{VALUE}}',
[261] Fix | Delete
],
[262] Fix | Delete
'condition' => [
[263] Fix | Delete
'tabs_direction' => [
[264] Fix | Delete
'',
[265] Fix | Delete
'block-start',
[266] Fix | Delete
'block-end',
[267] Fix | Delete
'top',
[268] Fix | Delete
'bottom',
[269] Fix | Delete
],
[270] Fix | Delete
],
[271] Fix | Delete
'frontend_available' => true,
[272] Fix | Delete
] );
[273] Fix | Delete
[274] Fix | Delete
$this->add_responsive_control( 'tabs_justify_vertical', [
[275] Fix | Delete
'label' => esc_html__( 'Justify', 'elementor' ),
[276] Fix | Delete
'type' => Controls_Manager::CHOOSE,
[277] Fix | Delete
'options' => [
[278] Fix | Delete
'start' => [
[279] Fix | Delete
'title' => esc_html__( 'Start', 'elementor' ),
[280] Fix | Delete
'icon' => 'eicon-align-start-v',
[281] Fix | Delete
],
[282] Fix | Delete
'center' => [
[283] Fix | Delete
'title' => esc_html__( 'Center', 'elementor' ),
[284] Fix | Delete
'icon' => 'eicon-align-center-v',
[285] Fix | Delete
],
[286] Fix | Delete
'end' => [
[287] Fix | Delete
'title' => esc_html__( 'End', 'elementor' ),
[288] Fix | Delete
'icon' => 'eicon-align-end-v',
[289] Fix | Delete
],
[290] Fix | Delete
'stretch' => [
[291] Fix | Delete
'title' => esc_html__( 'Stretch', 'elementor' ),
[292] Fix | Delete
'icon' => 'eicon-align-stretch-v',
[293] Fix | Delete
],
[294] Fix | Delete
],
[295] Fix | Delete
'selectors_dictionary' => [
[296] Fix | Delete
'start' => '--n-tabs-heading-justify-content: flex-start; --n-tabs-title-width: initial; --n-tabs-title-height: initial; --n-tabs-title-align-items: initial; --n-tabs-heading-wrap: wrap; --n-tabs-title-flex-basis: content',
[297] Fix | Delete
'center' => '--n-tabs-heading-justify-content: center; --n-tabs-title-width: initial; --n-tabs-title-height: initial; --n-tabs-title-align-items: initial; --n-tabs-heading-wrap: wrap; --n-tabs-title-flex-basis: content',
[298] Fix | Delete
'end' => '--n-tabs-heading-justify-content: flex-end; --n-tabs-title-width: initial; --n-tabs-title-height: initial; --n-tabs-title-align-items: initial; --n-tabs-heading-wrap: wrap; --n-tabs-title-flex-basis: content',
[299] Fix | Delete
'stretch' => '--n-tabs-heading-justify-content: flex-start; --n-tabs-title-width: initial; --n-tabs-title-height: 100%; --n-tabs-title-align-items: center; --n-tabs-heading-wrap: nowrap; --n-tabs-title-flex-basis: auto',
[300] Fix | Delete
],
[301] Fix | Delete
'selectors' => [
[302] Fix | Delete
'{{WRAPPER}}' => '{{VALUE}}',
[303] Fix | Delete
],
[304] Fix | Delete
'condition' => [
[305] Fix | Delete
'tabs_direction' => [
[306] Fix | Delete
'inline-start',
[307] Fix | Delete
'inline-end',
[308] Fix | Delete
'start',
[309] Fix | Delete
'end',
[310] Fix | Delete
],
[311] Fix | Delete
],
[312] Fix | Delete
] );
[313] Fix | Delete
[314] Fix | Delete
$this->add_responsive_control( 'tabs_width', [
[315] Fix | Delete
'label' => esc_html__( 'Width', 'elementor' ),
[316] Fix | Delete
'type' => Controls_Manager::SLIDER,
[317] Fix | Delete
'range' => [
[318] Fix | Delete
'%' => [
[319] Fix | Delete
'min' => 10,
[320] Fix | Delete
'max' => 50,
[321] Fix | Delete
],
[322] Fix | Delete
'px' => [
[323] Fix | Delete
'min' => 20,
[324] Fix | Delete
'max' => 600,
[325] Fix | Delete
],
[326] Fix | Delete
],
[327] Fix | Delete
'default' => [
[328] Fix | Delete
'unit' => '%',
[329] Fix | Delete
],
[330] Fix | Delete
'size_units' => [ 'px', '%', 'em', 'rem', 'vw', 'custom' ],
[331] Fix | Delete
'selectors' => [
[332] Fix | Delete
'{{WRAPPER}}' => '--n-tabs-heading-width: {{SIZE}}{{UNIT}}',
[333] Fix | Delete
],
[334] Fix | Delete
'condition' => [
[335] Fix | Delete
'tabs_direction' => [
[336] Fix | Delete
'inline-start',
[337] Fix | Delete
'inline-end',
[338] Fix | Delete
'start',
[339] Fix | Delete
'end',
[340] Fix | Delete
],
[341] Fix | Delete
],
[342] Fix | Delete
] );
[343] Fix | Delete
[344] Fix | Delete
$this->add_responsive_control( 'title_alignment', [
[345] Fix | Delete
'label' => esc_html__( 'Align Title', 'elementor' ),
[346] Fix | Delete
'type' => Controls_Manager::CHOOSE,
[347] Fix | Delete
'options' => [
[348] Fix | Delete
'start' => [
[349] Fix | Delete
'title' => esc_html__( 'Start', 'elementor' ),
[350] Fix | Delete
'icon' => 'eicon-text-align-left',
[351] Fix | Delete
],
[352] Fix | Delete
'center' => [
[353] Fix | Delete
'title' => esc_html__( 'Center', 'elementor' ),
[354] Fix | Delete
'icon' => 'eicon-text-align-center',
[355] Fix | Delete
],
[356] Fix | Delete
'end' => [
[357] Fix | Delete
'title' => esc_html__( 'End', 'elementor' ),
[358] Fix | Delete
'icon' => 'eicon-text-align-right',
[359] Fix | Delete
],
[360] Fix | Delete
],
[361] Fix | Delete
'selectors_dictionary' => [
[362] Fix | Delete
'start' => '--n-tabs-title-justify-content: flex-start; --n-tabs-title-align-items: flex-start; --n-tabs-title-text-align: start;',
[363] Fix | Delete
'center' => '--n-tabs-title-justify-content: center; --n-tabs-title-align-items: center; --n-tabs-title-text-align: center;',
[364] Fix | Delete
'end' => '--n-tabs-title-justify-content: flex-end; --n-tabs-title-align-items: flex-end; --n-tabs-title-text-align: end;',
[365] Fix | Delete
],
[366] Fix | Delete
'selectors' => [
[367] Fix | Delete
'{{WRAPPER}}' => '{{VALUE}}',
[368] Fix | Delete
],
[369] Fix | Delete
] );
[370] Fix | Delete
[371] Fix | Delete
$this->end_controls_section();
[372] Fix | Delete
[373] Fix | Delete
$this->start_controls_section( 'section_tabs_responsive', [
[374] Fix | Delete
'label' => esc_html__( 'Additional Settings', 'elementor' ),
[375] Fix | Delete
] );
[376] Fix | Delete
[377] Fix | Delete
$this->add_responsive_control(
[378] Fix | Delete
'horizontal_scroll',
[379] Fix | Delete
[
[380] Fix | Delete
'label' => esc_html__( 'Horizontal Scroll', 'elementor' ),
[381] Fix | Delete
'type' => Controls_Manager::SELECT,
[382] Fix | Delete
'description' => esc_html__( 'Note: Scroll tabs if they don’t fit into their parent container.', 'elementor' ),
[383] Fix | Delete
'options' => [
[384] Fix | Delete
'disable' => esc_html__( 'Disable', 'elementor' ),
[385] Fix | Delete
'enable' => esc_html__( 'Enable', 'elementor' ),
[386] Fix | Delete
],
[387] Fix | Delete
'default' => 'disable',
[388] Fix | Delete
'selectors_dictionary' => [
[389] Fix | Delete
'disable' => '--n-tabs-heading-wrap: wrap; --n-tabs-heading-overflow-x: initial; --n-tabs-title-white-space: initial;',
[390] Fix | Delete
'enable' => '--n-tabs-heading-wrap: nowrap; --n-tabs-heading-overflow-x: scroll; --n-tabs-title-white-space: nowrap;',
[391] Fix | Delete
],
[392] Fix | Delete
'selectors' => [
[393] Fix | Delete
'{{WRAPPER}}' => '{{VALUE}}',
[394] Fix | Delete
],
[395] Fix | Delete
'frontend_available' => true,
[396] Fix | Delete
'condition' => [
[397] Fix | Delete
'tabs_direction' => [
[398] Fix | Delete
'',
[399] Fix | Delete
'block-start',
[400] Fix | Delete
'block-end',
[401] Fix | Delete
'top',
[402] Fix | Delete
'bottom',
[403] Fix | Delete
],
[404] Fix | Delete
],
[405] Fix | Delete
]
[406] Fix | Delete
);
[407] Fix | Delete
[408] Fix | Delete
$dropdown_options = [
[409] Fix | Delete
'none' => esc_html__( 'None', 'elementor' ),
[410] Fix | Delete
];
[411] Fix | Delete
$excluded_breakpoints = [
[412] Fix | Delete
'laptop',
[413] Fix | Delete
'tablet_extra',
[414] Fix | Delete
'widescreen',
[415] Fix | Delete
];
[416] Fix | Delete
[417] Fix | Delete
foreach ( Plugin::$instance->breakpoints->get_active_breakpoints() as $breakpoint_key => $breakpoint_instance ) {
[418] Fix | Delete
// Exclude the larger breakpoints from the dropdown selector.
[419] Fix | Delete
if ( in_array( $breakpoint_key, $excluded_breakpoints, true ) ) {
[420] Fix | Delete
continue;
[421] Fix | Delete
}
[422] Fix | Delete
[423] Fix | Delete
$dropdown_options[ $breakpoint_key ] = sprintf(
[424] Fix | Delete
/* translators: 1: Breakpoint label, 2: `>` character, 3: Breakpoint value. */
[425] Fix | Delete
esc_html__( '%1$s (%2$s %3$dpx)', 'elementor' ),
[426] Fix | Delete
$breakpoint_instance->get_label(),
[427] Fix | Delete
'>',
[428] Fix | Delete
$breakpoint_instance->get_value()
[429] Fix | Delete
);
[430] Fix | Delete
}
[431] Fix | Delete
[432] Fix | Delete
$this->add_control(
[433] Fix | Delete
'breakpoint_selector',
[434] Fix | Delete
[
[435] Fix | Delete
'label' => esc_html__( 'Breakpoint', 'elementor' ),
[436] Fix | Delete
'type' => Controls_Manager::SELECT,
[437] Fix | Delete
'description' => esc_html__( 'Note: Choose at which breakpoint tabs will automatically switch to a vertical (“accordion”) layout.', 'elementor' ),
[438] Fix | Delete
'options' => $dropdown_options,
[439] Fix | Delete
'default' => 'mobile',
[440] Fix | Delete
'prefix_class' => 'e-n-tabs-',
[441] Fix | Delete
]
[442] Fix | Delete
);
[443] Fix | Delete
[444] Fix | Delete
$this->end_controls_section();
[445] Fix | Delete
[446] Fix | Delete
$this->start_controls_section( 'section_tabs_style', [
[447] Fix | Delete
'label' => esc_html__( 'Tabs', 'elementor' ),
[448] Fix | Delete
'tab' => Controls_Manager::TAB_STYLE,
[449] Fix | Delete
] );
[450] Fix | Delete
[451] Fix | Delete
$this->add_responsive_control( 'tabs_title_space_between', [
[452] Fix | Delete
'label' => esc_html__( 'Gap between tabs', 'elementor' ),
[453] Fix | Delete
'type' => Controls_Manager::SLIDER,
[454] Fix | Delete
'size_units' => [ 'px', 'em', 'rem', 'custom' ],
[455] Fix | Delete
'range' => [
[456] Fix | Delete
'px' => [
[457] Fix | Delete
'max' => 400,
[458] Fix | Delete
],
[459] Fix | Delete
'em' => [
[460] Fix | Delete
'max' => 40,
[461] Fix | Delete
],
[462] Fix | Delete
'rem' => [
[463] Fix | Delete
'max' => 40,
[464] Fix | Delete
],
[465] Fix | Delete
],
[466] Fix | Delete
'selectors' => [
[467] Fix | Delete
'{{WRAPPER}}' => '--n-tabs-title-gap: {{SIZE}}{{UNIT}}',
[468] Fix | Delete
],
[469] Fix | Delete
] );
[470] Fix | Delete
[471] Fix | Delete
$this->add_responsive_control( 'tabs_title_spacing', [
[472] Fix | Delete
'label' => esc_html__( 'Distance from content', 'elementor' ),
[473] Fix | Delete
'type' => Controls_Manager::SLIDER,
[474] Fix | Delete
'size_units' => [ 'px', 'em', 'rem', 'custom' ],
[475] Fix | Delete
'range' => [
[476] Fix | Delete
'px' => [
[477] Fix | Delete
'max' => 400,
[478] Fix | Delete
],
[479] Fix | Delete
'em' => [
[480] Fix | Delete
'max' => 40,
[481] Fix | Delete
],
[482] Fix | Delete
'rem' => [
[483] Fix | Delete
'max' => 40,
[484] Fix | Delete
],
[485] Fix | Delete
],
[486] Fix | Delete
'selectors' => [
[487] Fix | Delete
'{{WRAPPER}}' => '--n-tabs-gap: {{SIZE}}{{UNIT}}',
[488] Fix | Delete
],
[489] Fix | Delete
] );
[490] Fix | Delete
[491] Fix | Delete
$this->start_controls_tabs( 'tabs_title_style' );
[492] Fix | Delete
[493] Fix | Delete
$this->start_controls_tab(
[494] Fix | Delete
'tabs_title_normal',
[495] Fix | Delete
[
[496] Fix | Delete
'label' => esc_html__( 'Normal', 'elementor' ),
[497] Fix | Delete
]
[498] Fix | Delete
);
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function