Edit File by line
/home/barbar84/www/wp-conte.../themes/Divi/includes/builder/module
File: AccordionItem.php
<?php
[0] Fix | Delete
[1] Fix | Delete
class ET_Builder_Module_Accordion_Item extends ET_Builder_Module {
[2] Fix | Delete
function init() {
[3] Fix | Delete
$this->name = esc_html__( 'Accordion', 'et_builder' );
[4] Fix | Delete
$this->plural = esc_html__( 'Accordions', 'et_builder' );
[5] Fix | Delete
$this->slug = 'et_pb_accordion_item';
[6] Fix | Delete
$this->vb_support = 'on';
[7] Fix | Delete
$this->type = 'child';
[8] Fix | Delete
$this->child_title_var = 'title';
[9] Fix | Delete
$this->no_render = true;
[10] Fix | Delete
$this->main_css_element = '%%order_class%%.et_pb_toggle';
[11] Fix | Delete
[12] Fix | Delete
$this->settings_modal_toggles = array(
[13] Fix | Delete
'general' => array(
[14] Fix | Delete
'toggles' => array(
[15] Fix | Delete
'main_content' => et_builder_i18n( 'Text' ),
[16] Fix | Delete
),
[17] Fix | Delete
),
[18] Fix | Delete
'advanced' => array(
[19] Fix | Delete
'toggles' => array(
[20] Fix | Delete
'icon' => esc_html__( 'Icon', 'et_builder' ),
[21] Fix | Delete
'toggle_layout' => esc_html__( 'Toggle', 'et_builder' ),
[22] Fix | Delete
'text' => array(
[23] Fix | Delete
'title' => et_builder_i18n( 'Text' ),
[24] Fix | Delete
'priority' => 49,
[25] Fix | Delete
),
[26] Fix | Delete
),
[27] Fix | Delete
),
[28] Fix | Delete
);
[29] Fix | Delete
[30] Fix | Delete
$this->advanced_fields = array(
[31] Fix | Delete
'fonts' => array(
[32] Fix | Delete
'toggle' => array(
[33] Fix | Delete
'label' => et_builder_i18n( 'Title' ),
[34] Fix | Delete
'css' => array(
[35] Fix | Delete
'main' => "{$this->main_css_element} h5.et_pb_toggle_title, {$this->main_css_element} h1.et_pb_toggle_title, {$this->main_css_element} h2.et_pb_toggle_title, {$this->main_css_element} h3.et_pb_toggle_title, {$this->main_css_element} h4.et_pb_toggle_title, {$this->main_css_element} h6.et_pb_toggle_title",
[36] Fix | Delete
'important' => 'plugin_only',
[37] Fix | Delete
),
[38] Fix | Delete
'header_level' => array(
[39] Fix | Delete
'default' => 'h5',
[40] Fix | Delete
),
[41] Fix | Delete
'options_priority' => array(
[42] Fix | Delete
'toggle_text_color' => 9,
[43] Fix | Delete
),
[44] Fix | Delete
),
[45] Fix | Delete
'closed_toggle' => array(
[46] Fix | Delete
'label' => esc_html__( 'Closed Toggle', 'et_builder' ),
[47] Fix | Delete
'css' => array(
[48] Fix | Delete
'main' => "{$this->main_css_element}.et_pb_toggle_close h5.et_pb_toggle_title, {$this->main_css_element}.et_pb_toggle_close h1.et_pb_toggle_title, {$this->main_css_element}.et_pb_toggle_close h2.et_pb_toggle_title, {$this->main_css_element}.et_pb_toggle_close h3.et_pb_toggle_title, {$this->main_css_element}.et_pb_toggle_close h4.et_pb_toggle_title, {$this->main_css_element}.et_pb_toggle_close h6.et_pb_toggle_title",
[49] Fix | Delete
'important' => 'plugin_only',
[50] Fix | Delete
),
[51] Fix | Delete
'hide_text_color' => true,
[52] Fix | Delete
'line_height' => array(
[53] Fix | Delete
'default' => '1.7em',
[54] Fix | Delete
),
[55] Fix | Delete
'font_size' => array(
[56] Fix | Delete
'default' => '16px',
[57] Fix | Delete
),
[58] Fix | Delete
'letter_spacing' => array(
[59] Fix | Delete
'default' => '0px',
[60] Fix | Delete
),
[61] Fix | Delete
),
[62] Fix | Delete
'body' => array(
[63] Fix | Delete
'label' => et_builder_i18n( 'Body' ),
[64] Fix | Delete
'css' => array(
[65] Fix | Delete
'main' => "{$this->main_css_element} .et_pb_toggle_content",
[66] Fix | Delete
'limited_main' => "{$this->main_css_element} .et_pb_toggle_content, {$this->main_css_element} .et_pb_toggle_content p",
[67] Fix | Delete
'line_height' => "{$this->main_css_element} .et_pb_toggle_content p",
[68] Fix | Delete
),
[69] Fix | Delete
'block_elements' => array(
[70] Fix | Delete
'tabbed_subtoggles' => true,
[71] Fix | Delete
'bb_icons_support' => true,
[72] Fix | Delete
),
[73] Fix | Delete
),
[74] Fix | Delete
),
[75] Fix | Delete
'borders' => array(
[76] Fix | Delete
'default' => array(
[77] Fix | Delete
'css' => array(
[78] Fix | Delete
'main' => array(
[79] Fix | Delete
// Accordion Item can use %%parent_class%% because its slug is parent_slug + `_item` suffix
[80] Fix | Delete
'border_radii' => "%%parent_class%% .et_pb_module{$this->main_css_element}",
[81] Fix | Delete
'border_styles' => "%%parent_class%% .et_pb_module{$this->main_css_element}",
[82] Fix | Delete
),
[83] Fix | Delete
),
[84] Fix | Delete
'defaults' => array(
[85] Fix | Delete
'border_radii' => 'on||||',
[86] Fix | Delete
'border_styles' => array(
[87] Fix | Delete
'width' => '1px',
[88] Fix | Delete
'color' => '#d9d9d9',
[89] Fix | Delete
'style' => 'solid',
[90] Fix | Delete
),
[91] Fix | Delete
),
[92] Fix | Delete
),
[93] Fix | Delete
),
[94] Fix | Delete
'box_shadow' => array(
[95] Fix | Delete
'default' => array(
[96] Fix | Delete
'css' => array(
[97] Fix | Delete
'important' => true,
[98] Fix | Delete
),
[99] Fix | Delete
),
[100] Fix | Delete
),
[101] Fix | Delete
'margin_padding' => array(
[102] Fix | Delete
'draggable_margin' => false,
[103] Fix | Delete
'draggable_padding' => false,
[104] Fix | Delete
'css' => array(
[105] Fix | Delete
'important' => 'all',
[106] Fix | Delete
),
[107] Fix | Delete
),
[108] Fix | Delete
'max_width' => array(
[109] Fix | Delete
'css' => array(
[110] Fix | Delete
'module_alignment' => '%%order_class%%.et_pb_toggle',
[111] Fix | Delete
),
[112] Fix | Delete
),
[113] Fix | Delete
'text' => array(
[114] Fix | Delete
'css' => array(
[115] Fix | Delete
'text_orientation' => '%%order_class%%',
[116] Fix | Delete
),
[117] Fix | Delete
),
[118] Fix | Delete
'button' => false,
[119] Fix | Delete
'sticky' => false,
[120] Fix | Delete
'height' => array(
[121] Fix | Delete
'css' => array(
[122] Fix | Delete
'main' => '%%order_class%% .et_pb_toggle_content',
[123] Fix | Delete
),
[124] Fix | Delete
),
[125] Fix | Delete
'position_fields' => array(
[126] Fix | Delete
'default' => 'relative',
[127] Fix | Delete
),
[128] Fix | Delete
'z_index' => array(
[129] Fix | Delete
'default' => '1',
[130] Fix | Delete
),
[131] Fix | Delete
);
[132] Fix | Delete
[133] Fix | Delete
$this->custom_css_fields = array(
[134] Fix | Delete
'toggle' => array(
[135] Fix | Delete
'label' => esc_html__( 'Toggle', 'et_builder' ),
[136] Fix | Delete
),
[137] Fix | Delete
'open_toggle' => array(
[138] Fix | Delete
'label' => esc_html__( 'Open Toggle', 'et_builder' ),
[139] Fix | Delete
'selector' => '.et_pb_toggle_open',
[140] Fix | Delete
'no_space_before_selector' => true,
[141] Fix | Delete
),
[142] Fix | Delete
'toggle_title' => array(
[143] Fix | Delete
'label' => esc_html__( 'Toggle Title', 'et_builder' ),
[144] Fix | Delete
'selector' => '.et_pb_toggle_title',
[145] Fix | Delete
),
[146] Fix | Delete
'toggle_icon' => array(
[147] Fix | Delete
'label' => esc_html__( 'Toggle Icon', 'et_builder' ),
[148] Fix | Delete
'selector' => '.et_pb_toggle_title:before',
[149] Fix | Delete
),
[150] Fix | Delete
'toggle_content' => array(
[151] Fix | Delete
'label' => esc_html__( 'Toggle Content', 'et_builder' ),
[152] Fix | Delete
'selector' => '.et_pb_toggle_content',
[153] Fix | Delete
),
[154] Fix | Delete
);
[155] Fix | Delete
[156] Fix | Delete
$this->help_videos = array(
[157] Fix | Delete
array(
[158] Fix | Delete
'id' => 'OBbuKXTJyj8',
[159] Fix | Delete
'name' => esc_html__( 'An introduction to the Accordion module', 'et_builder' ),
[160] Fix | Delete
),
[161] Fix | Delete
);
[162] Fix | Delete
}
[163] Fix | Delete
[164] Fix | Delete
function get_fields() {
[165] Fix | Delete
$fields = array(
[166] Fix | Delete
'title' => array(
[167] Fix | Delete
'label' => et_builder_i18n( 'Title' ),
[168] Fix | Delete
'type' => 'text',
[169] Fix | Delete
'option_category' => 'basic_option',
[170] Fix | Delete
'description' => esc_html__( 'The title will appear above the content and when the toggle is closed.', 'et_builder' ),
[171] Fix | Delete
'toggle_slug' => 'main_content',
[172] Fix | Delete
'dynamic_content' => 'text',
[173] Fix | Delete
'hover' => 'tabs',
[174] Fix | Delete
'mobile_options' => true,
[175] Fix | Delete
),
[176] Fix | Delete
'content' => array(
[177] Fix | Delete
'label' => et_builder_i18n( 'Body' ),
[178] Fix | Delete
'type' => 'tiny_mce',
[179] Fix | Delete
'option_category' => 'basic_option',
[180] Fix | Delete
'description' => esc_html__( 'Here you can define the content that will be placed within the current tab.', 'et_builder' ),
[181] Fix | Delete
'toggle_slug' => 'main_content',
[182] Fix | Delete
'dynamic_content' => 'text',
[183] Fix | Delete
'hover' => 'tabs',
[184] Fix | Delete
'mobile_options' => true,
[185] Fix | Delete
),
[186] Fix | Delete
'open_toggle_text_color' => array(
[187] Fix | Delete
'label' => esc_html__( 'Open Title Text Color', 'et_builder' ),
[188] Fix | Delete
'description' => esc_html__( 'You can pick unique text colors for toggle titles when they are open and closed. Choose the open state title color here.', 'et_builder' ),
[189] Fix | Delete
'type' => 'color-alpha',
[190] Fix | Delete
'custom_color' => true,
[191] Fix | Delete
'tab_slug' => 'advanced',
[192] Fix | Delete
'toggle_slug' => 'toggle',
[193] Fix | Delete
'hover' => 'tabs',
[194] Fix | Delete
'mobile_options' => true,
[195] Fix | Delete
'sticky' => true,
[196] Fix | Delete
),
[197] Fix | Delete
'open_toggle_background_color' => array(
[198] Fix | Delete
'label' => esc_html__( 'Open Toggle Background Color', 'et_builder' ),
[199] Fix | Delete
'description' => esc_html__( 'You can pick unique background colors for toggles when they are in their open and closed states. Choose the open state background color here.', 'et_builder' ),
[200] Fix | Delete
'type' => 'color-alpha',
[201] Fix | Delete
'custom_color' => true,
[202] Fix | Delete
'tab_slug' => 'advanced',
[203] Fix | Delete
'toggle_slug' => 'toggle_layout',
[204] Fix | Delete
'hover' => 'tabs',
[205] Fix | Delete
'mobile_options' => true,
[206] Fix | Delete
'sticky' => true,
[207] Fix | Delete
),
[208] Fix | Delete
'closed_toggle_text_color' => array(
[209] Fix | Delete
'label' => esc_html__( 'Closed Title Text Color', 'et_builder' ),
[210] Fix | Delete
'description' => esc_html__( 'You can pick unique text colors for toggle titles when they are open and closed. Choose the closed state title color here.', 'et_builder' ),
[211] Fix | Delete
'type' => 'color-alpha',
[212] Fix | Delete
'custom_color' => true,
[213] Fix | Delete
'tab_slug' => 'advanced',
[214] Fix | Delete
'toggle_slug' => 'closed_toggle',
[215] Fix | Delete
'hover' => 'tabs',
[216] Fix | Delete
'mobile_options' => true,
[217] Fix | Delete
'sticky' => true,
[218] Fix | Delete
),
[219] Fix | Delete
'closed_toggle_background_color' => array(
[220] Fix | Delete
'label' => esc_html__( 'Closed Toggle Background Color', 'et_builder' ),
[221] Fix | Delete
'description' => esc_html__( 'You can pick unique background colors for toggles when they are in their open and closed states. Choose the closed state background color here.', 'et_builder' ),
[222] Fix | Delete
'type' => 'color-alpha',
[223] Fix | Delete
'custom_color' => true,
[224] Fix | Delete
'tab_slug' => 'advanced',
[225] Fix | Delete
'toggle_slug' => 'toggle_layout',
[226] Fix | Delete
'hover' => 'tabs',
[227] Fix | Delete
'mobile_options' => true,
[228] Fix | Delete
'sticky' => true,
[229] Fix | Delete
),
[230] Fix | Delete
'icon_color' => array(
[231] Fix | Delete
'label' => esc_html__( 'Icon Color', 'et_builder' ),
[232] Fix | Delete
'description' => esc_html__( 'Here you can define a custom color for the toggle icon.', 'et_builder' ),
[233] Fix | Delete
'type' => 'color-alpha',
[234] Fix | Delete
'custom_color' => true,
[235] Fix | Delete
'tab_slug' => 'advanced',
[236] Fix | Delete
'toggle_slug' => 'icon',
[237] Fix | Delete
'hover' => 'tabs',
[238] Fix | Delete
'mobile_options' => true,
[239] Fix | Delete
'sticky' => true,
[240] Fix | Delete
),
[241] Fix | Delete
'use_icon_font_size' => array(
[242] Fix | Delete
'label' => esc_html__( 'Use Icon Font Size', 'et_builder' ),
[243] Fix | Delete
'description' => esc_html__( 'If you would like to control the size of the icon, you must first enable this option.', 'et_builder' ),
[244] Fix | Delete
'type' => 'yes_no_button',
[245] Fix | Delete
'options' => array(
[246] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[247] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[248] Fix | Delete
),
[249] Fix | Delete
'default_on_front' => 'off',
[250] Fix | Delete
'affects' => array(
[251] Fix | Delete
'icon_font_size',
[252] Fix | Delete
),
[253] Fix | Delete
'depends_show_if' => 'on',
[254] Fix | Delete
'tab_slug' => 'advanced',
[255] Fix | Delete
'toggle_slug' => 'icon',
[256] Fix | Delete
'option_category' => 'font_option',
[257] Fix | Delete
),
[258] Fix | Delete
'icon_font_size' => array(
[259] Fix | Delete
'label' => esc_html__( 'Icon Font Size', 'et_builder' ),
[260] Fix | Delete
'description' => esc_html__( 'Control the size of the icon by increasing or decreasing the font size.', 'et_builder' ),
[261] Fix | Delete
'type' => 'range',
[262] Fix | Delete
'option_category' => 'font_option',
[263] Fix | Delete
'tab_slug' => 'advanced',
[264] Fix | Delete
'toggle_slug' => 'icon',
[265] Fix | Delete
'default' => '16px',
[266] Fix | Delete
'default_unit' => 'px',
[267] Fix | Delete
'default_on_front' => '',
[268] Fix | Delete
'range_settings' => array(
[269] Fix | Delete
'min' => '1',
[270] Fix | Delete
'max' => '120',
[271] Fix | Delete
'step' => '1',
[272] Fix | Delete
),
[273] Fix | Delete
'mobile_options' => true,
[274] Fix | Delete
'sticky' => true,
[275] Fix | Delete
'depends_show_if' => 'on',
[276] Fix | Delete
'hover' => 'tabs',
[277] Fix | Delete
),
[278] Fix | Delete
);
[279] Fix | Delete
return $fields;
[280] Fix | Delete
}
[281] Fix | Delete
}
[282] Fix | Delete
[283] Fix | Delete
new ET_Builder_Module_Accordion_Item();
[284] Fix | Delete
[285] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function