Edit File by line
/home/barbar84/www/wp-conte.../themes/Divi/includes/builder/module
File: Text.php
<?php
[0] Fix | Delete
[1] Fix | Delete
class ET_Builder_Module_Text extends ET_Builder_Module {
[2] Fix | Delete
function init() {
[3] Fix | Delete
$this->name = et_builder_i18n( 'Text' );
[4] Fix | Delete
$this->plural = esc_html__( 'Texts', 'et_builder' );
[5] Fix | Delete
$this->slug = 'et_pb_text';
[6] Fix | Delete
$this->vb_support = 'on';
[7] Fix | Delete
[8] Fix | Delete
$this->settings_modal_toggles = array(
[9] Fix | Delete
'general' => array(
[10] Fix | Delete
'toggles' => array(
[11] Fix | Delete
'main_content' => et_builder_i18n( 'Text' ),
[12] Fix | Delete
),
[13] Fix | Delete
),
[14] Fix | Delete
'advanced' => array(
[15] Fix | Delete
'toggles' => array(
[16] Fix | Delete
'text' => array(
[17] Fix | Delete
'title' => et_builder_i18n( 'Text' ),
[18] Fix | Delete
'priority' => 45,
[19] Fix | Delete
'tabbed_subtoggles' => true,
[20] Fix | Delete
'bb_icons_support' => true,
[21] Fix | Delete
'sub_toggles' => array(
[22] Fix | Delete
'p' => array(
[23] Fix | Delete
'name' => 'P',
[24] Fix | Delete
'icon' => 'text-left',
[25] Fix | Delete
),
[26] Fix | Delete
'a' => array(
[27] Fix | Delete
'name' => 'A',
[28] Fix | Delete
'icon' => 'text-link',
[29] Fix | Delete
),
[30] Fix | Delete
'ul' => array(
[31] Fix | Delete
'name' => 'UL',
[32] Fix | Delete
'icon' => 'list',
[33] Fix | Delete
),
[34] Fix | Delete
'ol' => array(
[35] Fix | Delete
'name' => 'OL',
[36] Fix | Delete
'icon' => 'numbered-list',
[37] Fix | Delete
),
[38] Fix | Delete
'quote' => array(
[39] Fix | Delete
'name' => 'QUOTE',
[40] Fix | Delete
'icon' => 'text-quote',
[41] Fix | Delete
),
[42] Fix | Delete
),
[43] Fix | Delete
),
[44] Fix | Delete
'header' => array(
[45] Fix | Delete
'title' => esc_html__( 'Heading Text', 'et_builder' ),
[46] Fix | Delete
'priority' => 49,
[47] Fix | Delete
'tabbed_subtoggles' => true,
[48] Fix | Delete
'sub_toggles' => array(
[49] Fix | Delete
'h1' => array(
[50] Fix | Delete
'name' => 'H1',
[51] Fix | Delete
'icon' => 'text-h1',
[52] Fix | Delete
),
[53] Fix | Delete
'h2' => array(
[54] Fix | Delete
'name' => 'H2',
[55] Fix | Delete
'icon' => 'text-h2',
[56] Fix | Delete
),
[57] Fix | Delete
'h3' => array(
[58] Fix | Delete
'name' => 'H3',
[59] Fix | Delete
'icon' => 'text-h3',
[60] Fix | Delete
),
[61] Fix | Delete
'h4' => array(
[62] Fix | Delete
'name' => 'H4',
[63] Fix | Delete
'icon' => 'text-h4',
[64] Fix | Delete
),
[65] Fix | Delete
'h5' => array(
[66] Fix | Delete
'name' => 'H5',
[67] Fix | Delete
'icon' => 'text-h5',
[68] Fix | Delete
),
[69] Fix | Delete
'h6' => array(
[70] Fix | Delete
'name' => 'H6',
[71] Fix | Delete
'icon' => 'text-h6',
[72] Fix | Delete
),
[73] Fix | Delete
),
[74] Fix | Delete
),
[75] Fix | Delete
'width' => array(
[76] Fix | Delete
'title' => et_builder_i18n( 'Sizing' ),
[77] Fix | Delete
'priority' => 65,
[78] Fix | Delete
),
[79] Fix | Delete
),
[80] Fix | Delete
),
[81] Fix | Delete
);
[82] Fix | Delete
[83] Fix | Delete
$this->main_css_element = '%%order_class%%';
[84] Fix | Delete
[85] Fix | Delete
$this->advanced_fields = array(
[86] Fix | Delete
'fonts' => array(
[87] Fix | Delete
'text' => array(
[88] Fix | Delete
'label' => et_builder_i18n( 'Text' ),
[89] Fix | Delete
'css' => array(
[90] Fix | Delete
'line_height' => "{$this->main_css_element} p",
[91] Fix | Delete
'color' => "{$this->main_css_element}.et_pb_text",
[92] Fix | Delete
),
[93] Fix | Delete
'line_height' => array(
[94] Fix | Delete
'default' => floatval( et_get_option( 'body_font_height', '1.7' ) ) . 'em',
[95] Fix | Delete
),
[96] Fix | Delete
'font_size' => array(
[97] Fix | Delete
'default' => absint( et_get_option( 'body_font_size', '14' ) ) . 'px',
[98] Fix | Delete
),
[99] Fix | Delete
'toggle_slug' => 'text',
[100] Fix | Delete
'sub_toggle' => 'p',
[101] Fix | Delete
'hide_text_align' => true,
[102] Fix | Delete
),
[103] Fix | Delete
'link' => array(
[104] Fix | Delete
'label' => et_builder_i18n( 'Link' ),
[105] Fix | Delete
'css' => array(
[106] Fix | Delete
'main' => "{$this->main_css_element} a",
[107] Fix | Delete
'color' => "{$this->main_css_element}.et_pb_text a",
[108] Fix | Delete
),
[109] Fix | Delete
'line_height' => array(
[110] Fix | Delete
'default' => '1em',
[111] Fix | Delete
),
[112] Fix | Delete
'font_size' => array(
[113] Fix | Delete
'default' => absint( et_get_option( 'body_font_size', '14' ) ) . 'px',
[114] Fix | Delete
),
[115] Fix | Delete
'toggle_slug' => 'text',
[116] Fix | Delete
'sub_toggle' => 'a',
[117] Fix | Delete
),
[118] Fix | Delete
'ul' => array(
[119] Fix | Delete
'label' => esc_html__( 'Unordered List', 'et_builder' ),
[120] Fix | Delete
'css' => array(
[121] Fix | Delete
'main' => "{$this->main_css_element} ul li",
[122] Fix | Delete
'color' => "{$this->main_css_element}.et_pb_text ul li, {$this->main_css_element}.et_pb_text ol li > ul li",
[123] Fix | Delete
'line_height' => "{$this->main_css_element} ul li",
[124] Fix | Delete
'item_indent' => "{$this->main_css_element} ul",
[125] Fix | Delete
),
[126] Fix | Delete
'line_height' => array(
[127] Fix | Delete
'default' => '1em',
[128] Fix | Delete
),
[129] Fix | Delete
'font_size' => array(
[130] Fix | Delete
'default' => '14px',
[131] Fix | Delete
),
[132] Fix | Delete
'toggle_slug' => 'text',
[133] Fix | Delete
'sub_toggle' => 'ul',
[134] Fix | Delete
),
[135] Fix | Delete
'ol' => array(
[136] Fix | Delete
'label' => esc_html__( 'Ordered List', 'et_builder' ),
[137] Fix | Delete
'css' => array(
[138] Fix | Delete
'main' => "{$this->main_css_element} ol li",
[139] Fix | Delete
'color' => "{$this->main_css_element}.et_pb_text ol li",
[140] Fix | Delete
'line_height' => "{$this->main_css_element} ol li",
[141] Fix | Delete
'item_indent' => "{$this->main_css_element} ol",
[142] Fix | Delete
),
[143] Fix | Delete
'line_height' => array(
[144] Fix | Delete
'default' => '1em',
[145] Fix | Delete
),
[146] Fix | Delete
'font_size' => array(
[147] Fix | Delete
'default' => '14px',
[148] Fix | Delete
),
[149] Fix | Delete
'toggle_slug' => 'text',
[150] Fix | Delete
'sub_toggle' => 'ol',
[151] Fix | Delete
),
[152] Fix | Delete
'quote' => array(
[153] Fix | Delete
'label' => esc_html__( 'Blockquote', 'et_builder' ),
[154] Fix | Delete
'css' => array(
[155] Fix | Delete
'main' => "{$this->main_css_element} blockquote",
[156] Fix | Delete
'color' => "{$this->main_css_element}.et_pb_text blockquote",
[157] Fix | Delete
),
[158] Fix | Delete
'line_height' => array(
[159] Fix | Delete
'default' => '1em',
[160] Fix | Delete
),
[161] Fix | Delete
'font_size' => array(
[162] Fix | Delete
'default' => '14px',
[163] Fix | Delete
),
[164] Fix | Delete
'toggle_slug' => 'text',
[165] Fix | Delete
'sub_toggle' => 'quote',
[166] Fix | Delete
),
[167] Fix | Delete
'header' => array(
[168] Fix | Delete
'label' => esc_html__( 'Heading', 'et_builder' ),
[169] Fix | Delete
'css' => array(
[170] Fix | Delete
'main' => "{$this->main_css_element} h1",
[171] Fix | Delete
),
[172] Fix | Delete
'font_size' => array(
[173] Fix | Delete
'default' => absint( et_get_option( 'body_header_size', '30' ) ) . 'px',
[174] Fix | Delete
),
[175] Fix | Delete
'toggle_slug' => 'header',
[176] Fix | Delete
'sub_toggle' => 'h1',
[177] Fix | Delete
),
[178] Fix | Delete
'header_2' => array(
[179] Fix | Delete
'label' => esc_html__( 'Heading 2', 'et_builder' ),
[180] Fix | Delete
'css' => array(
[181] Fix | Delete
'main' => "{$this->main_css_element} h2",
[182] Fix | Delete
),
[183] Fix | Delete
'font_size' => array(
[184] Fix | Delete
'default' => '26px',
[185] Fix | Delete
),
[186] Fix | Delete
'line_height' => array(
[187] Fix | Delete
'default' => '1em',
[188] Fix | Delete
),
[189] Fix | Delete
'toggle_slug' => 'header',
[190] Fix | Delete
'sub_toggle' => 'h2',
[191] Fix | Delete
),
[192] Fix | Delete
'header_3' => array(
[193] Fix | Delete
'label' => esc_html__( 'Heading 3', 'et_builder' ),
[194] Fix | Delete
'css' => array(
[195] Fix | Delete
'main' => "{$this->main_css_element} h3",
[196] Fix | Delete
),
[197] Fix | Delete
'font_size' => array(
[198] Fix | Delete
'default' => '22px',
[199] Fix | Delete
),
[200] Fix | Delete
'line_height' => array(
[201] Fix | Delete
'default' => '1em',
[202] Fix | Delete
),
[203] Fix | Delete
'toggle_slug' => 'header',
[204] Fix | Delete
'sub_toggle' => 'h3',
[205] Fix | Delete
),
[206] Fix | Delete
'header_4' => array(
[207] Fix | Delete
'label' => esc_html__( 'Heading 4', 'et_builder' ),
[208] Fix | Delete
'css' => array(
[209] Fix | Delete
'main' => "{$this->main_css_element} h4",
[210] Fix | Delete
),
[211] Fix | Delete
'font_size' => array(
[212] Fix | Delete
'default' => '18px',
[213] Fix | Delete
),
[214] Fix | Delete
'line_height' => array(
[215] Fix | Delete
'default' => '1em',
[216] Fix | Delete
),
[217] Fix | Delete
'toggle_slug' => 'header',
[218] Fix | Delete
'sub_toggle' => 'h4',
[219] Fix | Delete
),
[220] Fix | Delete
'header_5' => array(
[221] Fix | Delete
'label' => esc_html__( 'Heading 5', 'et_builder' ),
[222] Fix | Delete
'css' => array(
[223] Fix | Delete
'main' => "{$this->main_css_element} h5",
[224] Fix | Delete
),
[225] Fix | Delete
'font_size' => array(
[226] Fix | Delete
'default' => '16px',
[227] Fix | Delete
),
[228] Fix | Delete
'line_height' => array(
[229] Fix | Delete
'default' => '1em',
[230] Fix | Delete
),
[231] Fix | Delete
'toggle_slug' => 'header',
[232] Fix | Delete
'sub_toggle' => 'h5',
[233] Fix | Delete
),
[234] Fix | Delete
'header_6' => array(
[235] Fix | Delete
'label' => esc_html__( 'Heading 6', 'et_builder' ),
[236] Fix | Delete
'css' => array(
[237] Fix | Delete
'main' => "{$this->main_css_element} h6",
[238] Fix | Delete
),
[239] Fix | Delete
'font_size' => array(
[240] Fix | Delete
'default' => '14px',
[241] Fix | Delete
),
[242] Fix | Delete
'line_height' => array(
[243] Fix | Delete
'default' => '1em',
[244] Fix | Delete
),
[245] Fix | Delete
'toggle_slug' => 'header',
[246] Fix | Delete
'sub_toggle' => 'h6',
[247] Fix | Delete
),
[248] Fix | Delete
),
[249] Fix | Delete
'background' => array(
[250] Fix | Delete
'settings' => array(
[251] Fix | Delete
'color' => 'alpha',
[252] Fix | Delete
),
[253] Fix | Delete
),
[254] Fix | Delete
'margin_padding' => array(
[255] Fix | Delete
'css' => array(
[256] Fix | Delete
'important' => 'all',
[257] Fix | Delete
),
[258] Fix | Delete
),
[259] Fix | Delete
'text' => array(
[260] Fix | Delete
'use_background_layout' => true,
[261] Fix | Delete
'sub_toggle' => 'p',
[262] Fix | Delete
'options' => array(
[263] Fix | Delete
'text_orientation' => array(
[264] Fix | Delete
'default' => 'left',
[265] Fix | Delete
),
[266] Fix | Delete
'background_layout' => array(
[267] Fix | Delete
'default' => 'light',
[268] Fix | Delete
'hover' => 'tabs',
[269] Fix | Delete
),
[270] Fix | Delete
),
[271] Fix | Delete
),
[272] Fix | Delete
'text_shadow' => array(
[273] Fix | Delete
// Don't add text-shadow fields since they already are via font-options
[274] Fix | Delete
'default' => false,
[275] Fix | Delete
),
[276] Fix | Delete
'button' => false,
[277] Fix | Delete
);
[278] Fix | Delete
[279] Fix | Delete
$this->help_videos = array(
[280] Fix | Delete
array(
[281] Fix | Delete
'id' => 'oL00RjEKZaU',
[282] Fix | Delete
'name' => esc_html__( 'An introduction to the Text module', 'et_builder' ),
[283] Fix | Delete
),
[284] Fix | Delete
);
[285] Fix | Delete
}
[286] Fix | Delete
[287] Fix | Delete
function get_fields() {
[288] Fix | Delete
$fields = array(
[289] Fix | Delete
'content' => array(
[290] Fix | Delete
'label' => et_builder_i18n( 'Body' ),
[291] Fix | Delete
'type' => 'tiny_mce',
[292] Fix | Delete
'option_category' => 'basic_option',
[293] Fix | Delete
'description' => esc_html__( 'Here you can create the content that will be used within the module.', 'et_builder' ),
[294] Fix | Delete
'toggle_slug' => 'main_content',
[295] Fix | Delete
'dynamic_content' => 'text',
[296] Fix | Delete
'mobile_options' => true,
[297] Fix | Delete
'hover' => 'tabs',
[298] Fix | Delete
),
[299] Fix | Delete
'ul_type' => array(
[300] Fix | Delete
'label' => esc_html__( 'Unordered List Style Type', 'et_builder' ),
[301] Fix | Delete
'description' => esc_html__( 'This setting adjusts the shape of the bullet point that begins each list item.', 'et_builder' ),
[302] Fix | Delete
'type' => 'select',
[303] Fix | Delete
'option_category' => 'configuration',
[304] Fix | Delete
'options' => array(
[305] Fix | Delete
'disc' => et_builder_i18n( 'Disc' ),
[306] Fix | Delete
'circle' => et_builder_i18n( 'Circle' ),
[307] Fix | Delete
'square' => et_builder_i18n( 'Square' ),
[308] Fix | Delete
'none' => et_builder_i18n( 'None' ),
[309] Fix | Delete
),
[310] Fix | Delete
'priority' => 80,
[311] Fix | Delete
'default' => 'disc',
[312] Fix | Delete
'default_on_front' => '',
[313] Fix | Delete
'tab_slug' => 'advanced',
[314] Fix | Delete
'toggle_slug' => 'text',
[315] Fix | Delete
'sub_toggle' => 'ul',
[316] Fix | Delete
'mobile_options' => true,
[317] Fix | Delete
),
[318] Fix | Delete
'ul_position' => array(
[319] Fix | Delete
'label' => esc_html__( 'Unordered List Style Position', 'et_builder' ),
[320] Fix | Delete
'description' => esc_html__( 'The bullet point that begins each list item can be placed either inside or outside the parent list wrapper. Placing list items inside will indent them further within the list.', 'et_builder' ),
[321] Fix | Delete
'type' => 'select',
[322] Fix | Delete
'option_category' => 'configuration',
[323] Fix | Delete
'options' => array(
[324] Fix | Delete
'outside' => et_builder_i18n( 'Outside' ),
[325] Fix | Delete
'inside' => et_builder_i18n( 'Inside' ),
[326] Fix | Delete
),
[327] Fix | Delete
'priority' => 85,
[328] Fix | Delete
'default' => 'outside',
[329] Fix | Delete
'default_on_front' => '',
[330] Fix | Delete
'tab_slug' => 'advanced',
[331] Fix | Delete
'toggle_slug' => 'text',
[332] Fix | Delete
'sub_toggle' => 'ul',
[333] Fix | Delete
'mobile_options' => true,
[334] Fix | Delete
),
[335] Fix | Delete
'ul_item_indent' => array(
[336] Fix | Delete
'label' => esc_html__( 'Unordered List Item Indent', 'et_builder' ),
[337] Fix | Delete
'description' => esc_html__( 'Increasing indentation will push list items further towards the center of the text content, giving the list more visible separation from the the rest of the text.', 'et_builder' ),
[338] Fix | Delete
'type' => 'range',
[339] Fix | Delete
'option_category' => 'configuration',
[340] Fix | Delete
'tab_slug' => 'advanced',
[341] Fix | Delete
'toggle_slug' => 'text',
[342] Fix | Delete
'sub_toggle' => 'ul',
[343] Fix | Delete
'priority' => 90,
[344] Fix | Delete
'default' => '0px',
[345] Fix | Delete
'default_unit' => 'px',
[346] Fix | Delete
'default_on_front' => '',
[347] Fix | Delete
'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
[348] Fix | Delete
'range_settings' => array(
[349] Fix | Delete
'min' => '0',
[350] Fix | Delete
'max' => '100',
[351] Fix | Delete
'step' => '1',
[352] Fix | Delete
),
[353] Fix | Delete
'mobile_options' => true,
[354] Fix | Delete
),
[355] Fix | Delete
'ol_type' => array(
[356] Fix | Delete
'label' => esc_html__( 'Ordered List Style Type', 'et_builder' ),
[357] Fix | Delete
'description' => esc_html__( 'Here you can choose which types of characters are used to distinguish between each item in the ordered list.', 'et_builder' ),
[358] Fix | Delete
'type' => 'select',
[359] Fix | Delete
'option_category' => 'configuration',
[360] Fix | Delete
'options' => array(
[361] Fix | Delete
'decimal' => 'decimal',
[362] Fix | Delete
'armenian' => 'armenian',
[363] Fix | Delete
'cjk-ideographic' => 'cjk-ideographic',
[364] Fix | Delete
'decimal-leading-zero' => 'decimal-leading-zero',
[365] Fix | Delete
'georgian' => 'georgian',
[366] Fix | Delete
'hebrew' => 'hebrew',
[367] Fix | Delete
'hiragana' => 'hiragana',
[368] Fix | Delete
'hiragana-iroha' => 'hiragana-iroha',
[369] Fix | Delete
'katakana' => 'katakana',
[370] Fix | Delete
'katakana-iroha' => 'katakana-iroha',
[371] Fix | Delete
'lower-alpha' => 'lower-alpha',
[372] Fix | Delete
'lower-greek' => 'lower-greek',
[373] Fix | Delete
'lower-latin' => 'lower-latin',
[374] Fix | Delete
'lower-roman' => 'lower-roman',
[375] Fix | Delete
'upper-alpha' => 'upper-alpha',
[376] Fix | Delete
'upper-greek' => 'upper-greek',
[377] Fix | Delete
'upper-latin' => 'upper-latin',
[378] Fix | Delete
'upper-roman' => 'upper-roman',
[379] Fix | Delete
'none' => 'none',
[380] Fix | Delete
),
[381] Fix | Delete
'priority' => 80,
[382] Fix | Delete
'default' => 'decimal',
[383] Fix | Delete
'default_on_front' => '',
[384] Fix | Delete
'tab_slug' => 'advanced',
[385] Fix | Delete
'toggle_slug' => 'text',
[386] Fix | Delete
'sub_toggle' => 'ol',
[387] Fix | Delete
'mobile_options' => true,
[388] Fix | Delete
),
[389] Fix | Delete
'ol_position' => array(
[390] Fix | Delete
'label' => esc_html__( 'Ordered List Style Position', 'et_builder' ),
[391] Fix | Delete
'description' => esc_html__( 'The characters that begins each list item can be placed either inside or outside the parent list wrapper. Placing list items inside will indent them further within the list.', 'et_builder' ),
[392] Fix | Delete
'type' => 'select',
[393] Fix | Delete
'option_category' => 'configuration',
[394] Fix | Delete
'options' => array(
[395] Fix | Delete
'inside' => et_builder_i18n( 'Inside' ),
[396] Fix | Delete
'outside' => et_builder_i18n( 'Outside' ),
[397] Fix | Delete
),
[398] Fix | Delete
'priority' => 85,
[399] Fix | Delete
'default' => 'inside',
[400] Fix | Delete
'default_on_front' => '',
[401] Fix | Delete
'tab_slug' => 'advanced',
[402] Fix | Delete
'toggle_slug' => 'text',
[403] Fix | Delete
'sub_toggle' => 'ol',
[404] Fix | Delete
'mobile_options' => true,
[405] Fix | Delete
),
[406] Fix | Delete
'ol_item_indent' => array(
[407] Fix | Delete
'label' => esc_html__( 'Ordered List Item Indent', 'et_builder' ),
[408] Fix | Delete
'description' => esc_html__( 'Increasing indentation will push list items further towards the center of the text content, giving the list more visible separation from the the rest of the text.', 'et_builder' ),
[409] Fix | Delete
'type' => 'range',
[410] Fix | Delete
'option_category' => 'configuration',
[411] Fix | Delete
'tab_slug' => 'advanced',
[412] Fix | Delete
'toggle_slug' => 'text',
[413] Fix | Delete
'sub_toggle' => 'ol',
[414] Fix | Delete
'priority' => 90,
[415] Fix | Delete
'default' => '0px',
[416] Fix | Delete
'default_unit' => 'px',
[417] Fix | Delete
'default_on_front' => '',
[418] Fix | Delete
'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
[419] Fix | Delete
'range_settings' => array(
[420] Fix | Delete
'min' => '0',
[421] Fix | Delete
'max' => '100',
[422] Fix | Delete
'step' => '1',
[423] Fix | Delete
),
[424] Fix | Delete
'mobile_options' => true,
[425] Fix | Delete
),
[426] Fix | Delete
'quote_border_weight' => array(
[427] Fix | Delete
'label' => esc_html__( 'Blockquote Border Weight', 'et_builder' ),
[428] Fix | Delete
'description' => esc_html__( 'Block quotes are given a border to separate them from normal text. You can increase or decrease the size of that border using this setting.', 'et_builder' ),
[429] Fix | Delete
'type' => 'range',
[430] Fix | Delete
'option_category' => 'configuration',
[431] Fix | Delete
'tab_slug' => 'advanced',
[432] Fix | Delete
'toggle_slug' => 'text',
[433] Fix | Delete
'sub_toggle' => 'quote',
[434] Fix | Delete
'priority' => 85,
[435] Fix | Delete
'default' => '5px',
[436] Fix | Delete
'default_unit' => 'px',
[437] Fix | Delete
'default_on_front' => '',
[438] Fix | Delete
'allowed_units' => array( 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
[439] Fix | Delete
'range_settings' => array(
[440] Fix | Delete
'min' => '0',
[441] Fix | Delete
'max' => '100',
[442] Fix | Delete
'step' => '1',
[443] Fix | Delete
),
[444] Fix | Delete
'mobile_options' => true,
[445] Fix | Delete
'sticky' => true,
[446] Fix | Delete
'hover' => 'tabs',
[447] Fix | Delete
),
[448] Fix | Delete
'quote_border_color' => array(
[449] Fix | Delete
'label' => esc_html__( 'Blockquote Border Color', 'et_builder' ),
[450] Fix | Delete
'description' => esc_html__( 'Block quotes are given a border to separate them from normal text. Pick a color to use for that border.', 'et_builder' ),
[451] Fix | Delete
'type' => 'color-alpha',
[452] Fix | Delete
'option_category' => 'configuration',
[453] Fix | Delete
'custom_color' => true,
[454] Fix | Delete
'tab_slug' => 'advanced',
[455] Fix | Delete
'toggle_slug' => 'text',
[456] Fix | Delete
'sub_toggle' => 'quote',
[457] Fix | Delete
'field_template' => 'color',
[458] Fix | Delete
'priority' => 90,
[459] Fix | Delete
'mobile_options' => true,
[460] Fix | Delete
'sticky' => true,
[461] Fix | Delete
'hover' => 'tabs',
[462] Fix | Delete
),
[463] Fix | Delete
);
[464] Fix | Delete
[465] Fix | Delete
return $fields;
[466] Fix | Delete
}
[467] Fix | Delete
[468] Fix | Delete
function convert_embeds( $matches ) {
[469] Fix | Delete
$url = $matches[1];
[470] Fix | Delete
[471] Fix | Delete
if ( strpos( $url, '?v=' ) ) {
[472] Fix | Delete
// e.g. https://www.youtube.com/watch?v=Wx6bTxiOmRc
[473] Fix | Delete
$pieces = explode( 'v=', $url );
[474] Fix | Delete
$video_id = $pieces[1];
[475] Fix | Delete
} else {
[476] Fix | Delete
// e.g. https://youtu.be/UABdOJQ3pdo
[477] Fix | Delete
$pieces = explode( '/', $url );
[478] Fix | Delete
$video_id = end( $pieces );
[479] Fix | Delete
}
[480] Fix | Delete
[481] Fix | Delete
return sprintf(
[482] Fix | Delete
'<p><iframe width="1080" height="608" src="%s" allow="%s" allowfullscreen></iframe></p>',
[483] Fix | Delete
sprintf( 'https://www.youtube.com/embed/%s', esc_attr( $video_id ) ),
[484] Fix | Delete
'accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture'
[485] Fix | Delete
);
[486] Fix | Delete
}
[487] Fix | Delete
[488] Fix | Delete
/**
[489] Fix | Delete
* Transition fields for Text module.
[490] Fix | Delete
*
[491] Fix | Delete
* @since 3.26
[492] Fix | Delete
*
[493] Fix | Delete
* @return array Fields list in array.
[494] Fix | Delete
*/
[495] Fix | Delete
public function get_transition_fields_css_props() {
[496] Fix | Delete
$fields = parent::get_transition_fields_css_props();
[497] Fix | Delete
[498] Fix | Delete
$fields['quote_border_weight'] = array( 'border-width' => '%%order_class%% blockquote' );
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function