Edit File by line
/home/barbar84/www/wp-conte.../themes/Divi/includes/builder/module
File: PostTitle.php
<?php
[0] Fix | Delete
[1] Fix | Delete
class ET_Builder_Module_Post_Title extends ET_Builder_Module {
[2] Fix | Delete
function init() {
[3] Fix | Delete
$this->name = esc_html__( 'Post Title', 'et_builder' );
[4] Fix | Delete
$this->plural = esc_html__( 'Post Titles', 'et_builder' );
[5] Fix | Delete
$this->slug = 'et_pb_post_title';
[6] Fix | Delete
$this->vb_support = 'on';
[7] Fix | Delete
$this->defaults = array();
[8] Fix | Delete
$this->featured_image_background = true;
[9] Fix | Delete
[10] Fix | Delete
$this->main_css_element = '%%order_class%%';
[11] Fix | Delete
[12] Fix | Delete
$this->settings_modal_toggles = array(
[13] Fix | Delete
'general' => array(
[14] Fix | Delete
'toggles' => array(
[15] Fix | Delete
'elements' => et_builder_i18n( 'Elements' ),
[16] Fix | Delete
),
[17] Fix | Delete
),
[18] Fix | Delete
'advanced' => array(
[19] Fix | Delete
'toggles' => array(
[20] Fix | Delete
'text' => array(
[21] Fix | Delete
'title' => et_builder_i18n( 'Text' ),
[22] Fix | Delete
'priority' => 49,
[23] Fix | Delete
),
[24] Fix | Delete
'image_settings' => et_builder_i18n( 'Image' ),
[25] Fix | Delete
),
[26] Fix | Delete
),
[27] Fix | Delete
);
[28] Fix | Delete
[29] Fix | Delete
$this->advanced_fields = array(
[30] Fix | Delete
'borders' => array(
[31] Fix | Delete
'default' => array(
[32] Fix | Delete
'css' => array(
[33] Fix | Delete
'main' => array(
[34] Fix | Delete
'border_radii' => "{$this->main_css_element}.et_pb_featured_bg, {$this->main_css_element}",
[35] Fix | Delete
'border_styles' => "{$this->main_css_element}.et_pb_featured_bg, {$this->main_css_element}",
[36] Fix | Delete
),
[37] Fix | Delete
),
[38] Fix | Delete
),
[39] Fix | Delete
),
[40] Fix | Delete
'margin_padding' => array(
[41] Fix | Delete
'css' => array(
[42] Fix | Delete
'main' => ".et_pb_section {$this->main_css_element}.et_pb_post_title",
[43] Fix | Delete
'margin' => ".et_pb_section {$this->main_css_element}.et_pb_post_title",
[44] Fix | Delete
'important' => 'all',
[45] Fix | Delete
),
[46] Fix | Delete
),
[47] Fix | Delete
'fonts' => array(
[48] Fix | Delete
'title' => array(
[49] Fix | Delete
'label' => et_builder_i18n( 'Title' ),
[50] Fix | Delete
'use_all_caps' => true,
[51] Fix | Delete
'css' => array(
[52] Fix | Delete
'main' => "{$this->main_css_element} .et_pb_title_container h1.entry-title, {$this->main_css_element} .et_pb_title_container h2.entry-title, {$this->main_css_element} .et_pb_title_container h3.entry-title, {$this->main_css_element} .et_pb_title_container h4.entry-title, {$this->main_css_element} .et_pb_title_container h5.entry-title, {$this->main_css_element} .et_pb_title_container h6.entry-title",
[53] Fix | Delete
),
[54] Fix | Delete
'header_level' => array(
[55] Fix | Delete
'default' => 'h1',
[56] Fix | Delete
),
[57] Fix | Delete
),
[58] Fix | Delete
'meta' => array(
[59] Fix | Delete
'label' => esc_html__( 'Meta', 'et_builder' ),
[60] Fix | Delete
'css' => array(
[61] Fix | Delete
'main' => "{$this->main_css_element} .et_pb_title_container .et_pb_title_meta_container, {$this->main_css_element} .et_pb_title_container .et_pb_title_meta_container a",
[62] Fix | Delete
'limited_main' => "{$this->main_css_element} .et_pb_title_container .et_pb_title_meta_container, {$this->main_css_element} .et_pb_title_container .et_pb_title_meta_container a, {$this->main_css_element} .et_pb_title_container .et_pb_title_meta_container span",
[63] Fix | Delete
),
[64] Fix | Delete
),
[65] Fix | Delete
),
[66] Fix | Delete
'background' => array(
[67] Fix | Delete
'css' => array(
[68] Fix | Delete
'main' => "{$this->main_css_element}, {$this->main_css_element}.et_pb_featured_bg",
[69] Fix | Delete
),
[70] Fix | Delete
),
[71] Fix | Delete
'max_width' => array(
[72] Fix | Delete
'css' => array(
[73] Fix | Delete
'module_alignment' => '.et_pb_section %%order_class%%.et_pb_post_title.et_pb_module',
[74] Fix | Delete
),
[75] Fix | Delete
),
[76] Fix | Delete
'text' => array(
[77] Fix | Delete
'options' => array(
[78] Fix | Delete
'text_orientation' => array(
[79] Fix | Delete
'default' => 'left',
[80] Fix | Delete
),
[81] Fix | Delete
),
[82] Fix | Delete
'css' => array(
[83] Fix | Delete
'main' => implode(
[84] Fix | Delete
', ',
[85] Fix | Delete
array(
[86] Fix | Delete
'%%order_class%% .entry-title',
[87] Fix | Delete
'%%order_class%% .et_pb_title_meta_container',
[88] Fix | Delete
)
[89] Fix | Delete
),
[90] Fix | Delete
),
[91] Fix | Delete
),
[92] Fix | Delete
'button' => false,
[93] Fix | Delete
);
[94] Fix | Delete
[95] Fix | Delete
$this->custom_css_fields = array(
[96] Fix | Delete
'post_title' => array(
[97] Fix | Delete
'label' => et_builder_i18n( 'Title' ),
[98] Fix | Delete
'selector' => 'h1',
[99] Fix | Delete
),
[100] Fix | Delete
'post_meta' => array(
[101] Fix | Delete
'label' => esc_html__( 'Meta', 'et_builder' ),
[102] Fix | Delete
'selector' => '.et_pb_title_meta_container',
[103] Fix | Delete
),
[104] Fix | Delete
'post_image' => array(
[105] Fix | Delete
'label' => esc_html__( 'Featured Image', 'et_builder' ),
[106] Fix | Delete
'selector' => '.et_pb_title_featured_container',
[107] Fix | Delete
),
[108] Fix | Delete
);
[109] Fix | Delete
[110] Fix | Delete
$this->help_videos = array(
[111] Fix | Delete
array(
[112] Fix | Delete
'id' => 'wb8c06U0uCU',
[113] Fix | Delete
'name' => esc_html__( 'An introduction to the Post Title module', 'et_builder' ),
[114] Fix | Delete
),
[115] Fix | Delete
);
[116] Fix | Delete
}
[117] Fix | Delete
[118] Fix | Delete
function get_fields() {
[119] Fix | Delete
$fields = array(
[120] Fix | Delete
'title' => array(
[121] Fix | Delete
'label' => esc_html__( 'Show Title', 'et_builder' ),
[122] Fix | Delete
'type' => 'yes_no_button',
[123] Fix | Delete
'option_category' => 'configuration',
[124] Fix | Delete
'options' => array(
[125] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[126] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[127] Fix | Delete
),
[128] Fix | Delete
'default_on_front' => 'on',
[129] Fix | Delete
'toggle_slug' => 'elements',
[130] Fix | Delete
'description' => esc_html__( 'Here you can choose whether or not display the Post Title', 'et_builder' ),
[131] Fix | Delete
'mobile_options' => true,
[132] Fix | Delete
'hover' => 'tabs',
[133] Fix | Delete
),
[134] Fix | Delete
'meta' => array(
[135] Fix | Delete
'label' => esc_html__( 'Show Meta', 'et_builder' ),
[136] Fix | Delete
'type' => 'yes_no_button',
[137] Fix | Delete
'option_category' => 'configuration',
[138] Fix | Delete
'options' => array(
[139] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[140] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[141] Fix | Delete
),
[142] Fix | Delete
'default_on_front' => 'on',
[143] Fix | Delete
'affects' => array(
[144] Fix | Delete
'author',
[145] Fix | Delete
'date',
[146] Fix | Delete
'comments',
[147] Fix | Delete
),
[148] Fix | Delete
'toggle_slug' => 'elements',
[149] Fix | Delete
'description' => esc_html__( 'Here you can choose whether or not display the Post Meta', 'et_builder' ),
[150] Fix | Delete
'mobile_options' => true,
[151] Fix | Delete
'hover' => 'tabs',
[152] Fix | Delete
),
[153] Fix | Delete
'author' => array(
[154] Fix | Delete
'label' => esc_html__( 'Show Author', 'et_builder' ),
[155] Fix | Delete
'type' => 'yes_no_button',
[156] Fix | Delete
'option_category' => 'configuration',
[157] Fix | Delete
'options' => array(
[158] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[159] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[160] Fix | Delete
),
[161] Fix | Delete
'default_on_front' => 'on',
[162] Fix | Delete
'depends_show_if' => 'on',
[163] Fix | Delete
'toggle_slug' => 'elements',
[164] Fix | Delete
'description' => esc_html__( 'Here you can choose whether or not display the Author Name in Post Meta', 'et_builder' ),
[165] Fix | Delete
'mobile_options' => true,
[166] Fix | Delete
'hover' => 'tabs',
[167] Fix | Delete
),
[168] Fix | Delete
'date' => array(
[169] Fix | Delete
'label' => esc_html__( 'Show Date', 'et_builder' ),
[170] Fix | Delete
'type' => 'yes_no_button',
[171] Fix | Delete
'option_category' => 'configuration',
[172] Fix | Delete
'options' => array(
[173] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[174] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[175] Fix | Delete
),
[176] Fix | Delete
'default_on_front' => 'on',
[177] Fix | Delete
'depends_show_if' => 'on',
[178] Fix | Delete
'affects' => array(
[179] Fix | Delete
'date_format',
[180] Fix | Delete
),
[181] Fix | Delete
'toggle_slug' => 'elements',
[182] Fix | Delete
'description' => esc_html__( 'Here you can choose whether or not display the Date in Post Meta', 'et_builder' ),
[183] Fix | Delete
'mobile_options' => true,
[184] Fix | Delete
'hover' => 'tabs',
[185] Fix | Delete
),
[186] Fix | Delete
'date_format' => array(
[187] Fix | Delete
'label' => esc_html__( 'Date Format', 'et_builder' ),
[188] Fix | Delete
'type' => 'text',
[189] Fix | Delete
'option_category' => 'configuration',
[190] Fix | Delete
'default_on_front' => 'M j, Y',
[191] Fix | Delete
'depends_show_if' => 'on',
[192] Fix | Delete
'toggle_slug' => 'elements',
[193] Fix | Delete
'description' => esc_html__( 'Here you can define the Date Format in Post Meta. Default is \'M j, Y\'', 'et_builder' ),
[194] Fix | Delete
),
[195] Fix | Delete
'categories' => array(
[196] Fix | Delete
'label' => esc_html__( 'Show Post Categories', 'et_builder' ),
[197] Fix | Delete
'type' => 'yes_no_button',
[198] Fix | Delete
'option_category' => 'configuration',
[199] Fix | Delete
'options' => array(
[200] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[201] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[202] Fix | Delete
),
[203] Fix | Delete
'default_on_front' => 'on',
[204] Fix | Delete
'show_if' => array(
[205] Fix | Delete
'meta' => 'on',
[206] Fix | Delete
'function.isPostOrTBLayout' => 'on',
[207] Fix | Delete
),
[208] Fix | Delete
'toggle_slug' => 'elements',
[209] Fix | Delete
'description' => esc_html__( 'Here you can choose whether or not display the Categories in Post Meta. Note: This option doesn\'t work with custom post types.', 'et_builder' ),
[210] Fix | Delete
'mobile_options' => true,
[211] Fix | Delete
'hover' => 'tabs',
[212] Fix | Delete
),
[213] Fix | Delete
'comments' => array(
[214] Fix | Delete
'label' => esc_html__( 'Show Comments Count', 'et_builder' ),
[215] Fix | Delete
'type' => 'yes_no_button',
[216] Fix | Delete
'option_category' => 'configuration',
[217] Fix | Delete
'options' => array(
[218] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[219] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[220] Fix | Delete
),
[221] Fix | Delete
'default_on_front' => 'on',
[222] Fix | Delete
'depends_show_if' => 'on',
[223] Fix | Delete
'toggle_slug' => 'elements',
[224] Fix | Delete
'description' => esc_html__( 'Here you can choose whether or not display the Comments Count in Post Meta.', 'et_builder' ),
[225] Fix | Delete
'mobile_options' => true,
[226] Fix | Delete
'hover' => 'tabs',
[227] Fix | Delete
),
[228] Fix | Delete
'featured_image' => array(
[229] Fix | Delete
'label' => esc_html__( 'Show Featured Image', 'et_builder' ),
[230] Fix | Delete
'type' => 'yes_no_button',
[231] Fix | Delete
'option_category' => 'configuration',
[232] Fix | Delete
'options' => array(
[233] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[234] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[235] Fix | Delete
),
[236] Fix | Delete
'default_on_front' => 'on',
[237] Fix | Delete
'affects' => array(
[238] Fix | Delete
'featured_placement',
[239] Fix | Delete
),
[240] Fix | Delete
'toggle_slug' => 'elements',
[241] Fix | Delete
'description' => esc_html__( 'Here you can choose whether or not display the Featured Image', 'et_builder' ),
[242] Fix | Delete
'mobile_options' => true,
[243] Fix | Delete
'hover' => 'tabs',
[244] Fix | Delete
),
[245] Fix | Delete
'featured_placement' => array(
[246] Fix | Delete
'label' => esc_html__( 'Featured Image Placement', 'et_builder' ),
[247] Fix | Delete
'type' => 'select',
[248] Fix | Delete
'option_category' => 'configuration',
[249] Fix | Delete
'options' => array(
[250] Fix | Delete
'below' => esc_html__( 'Below Title', 'et_builder' ),
[251] Fix | Delete
'above' => esc_html__( 'Above Title', 'et_builder' ),
[252] Fix | Delete
'background' => esc_html__( 'Title/Meta Background Image', 'et_builder' ),
[253] Fix | Delete
),
[254] Fix | Delete
'default_on_front' => 'below',
[255] Fix | Delete
'depends_show_if' => 'on',
[256] Fix | Delete
'toggle_slug' => 'elements',
[257] Fix | Delete
'description' => esc_html__( 'Here you can choose where to place the Featured Image', 'et_builder' ),
[258] Fix | Delete
),
[259] Fix | Delete
'force_fullwidth' => array(
[260] Fix | Delete
'label' => esc_html__( 'Force Fullwidth', 'et_builder' ),
[261] Fix | Delete
'description' => esc_html__( "When enabled, this will force your image to extend 100% of the width of the column it's in.", 'et_builder' ),
[262] Fix | Delete
'type' => 'yes_no_button',
[263] Fix | Delete
'option_category' => 'layout',
[264] Fix | Delete
'options' => array(
[265] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[266] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[267] Fix | Delete
),
[268] Fix | Delete
'default' => 'on',
[269] Fix | Delete
'tab_slug' => 'advanced',
[270] Fix | Delete
'toggle_slug' => 'width',
[271] Fix | Delete
'show_if' => array(
[272] Fix | Delete
'featured_image' => 'on',
[273] Fix | Delete
'featured_placement' => array( 'below', 'above' ),
[274] Fix | Delete
),
[275] Fix | Delete
),
[276] Fix | Delete
'image_width' => array(
[277] Fix | Delete
'label' => esc_html__( 'Featured Image Width', 'et_builder' ),
[278] Fix | Delete
'description' => esc_html__( 'Adjust the width of the featured image.', 'et_builder' ),
[279] Fix | Delete
'type' => 'range',
[280] Fix | Delete
'option_category' => 'layout',
[281] Fix | Delete
'tab_slug' => 'advanced',
[282] Fix | Delete
'toggle_slug' => 'width',
[283] Fix | Delete
'allowed_values' => et_builder_get_acceptable_css_string_values( 'width' ),
[284] Fix | Delete
'default' => '100%',
[285] Fix | Delete
'default_unit' => '%',
[286] Fix | Delete
'range_settings' => array(
[287] Fix | Delete
'min' => '0',
[288] Fix | Delete
'max' => '100',
[289] Fix | Delete
'step' => '1',
[290] Fix | Delete
),
[291] Fix | Delete
'responsive' => true,
[292] Fix | Delete
'show_if' => array(
[293] Fix | Delete
'featured_image' => 'on',
[294] Fix | Delete
'featured_placement' => array( 'below', 'above' ),
[295] Fix | Delete
'force_fullwidth' => 'off',
[296] Fix | Delete
),
[297] Fix | Delete
'sticky' => true,
[298] Fix | Delete
),
[299] Fix | Delete
'image_max_width' => array(
[300] Fix | Delete
'label' => esc_html__( 'Featured Image Max Width', 'et_builder' ),
[301] Fix | Delete
'description' => esc_html__( 'Adjust the max width of the featured image.', 'et_builder' ),
[302] Fix | Delete
'type' => 'range',
[303] Fix | Delete
'option_category' => 'layout',
[304] Fix | Delete
'tab_slug' => 'advanced',
[305] Fix | Delete
'toggle_slug' => 'width',
[306] Fix | Delete
'allowed_values' => et_builder_get_acceptable_css_string_values( 'max-width' ),
[307] Fix | Delete
'default' => 'none',
[308] Fix | Delete
'default_unit' => '%',
[309] Fix | Delete
'range_settings' => array(
[310] Fix | Delete
'min' => '0',
[311] Fix | Delete
'max' => '100',
[312] Fix | Delete
'step' => '1',
[313] Fix | Delete
),
[314] Fix | Delete
'responsive' => true,
[315] Fix | Delete
'show_if' => array(
[316] Fix | Delete
'featured_image' => 'on',
[317] Fix | Delete
'featured_placement' => array( 'below', 'above' ),
[318] Fix | Delete
'force_fullwidth' => 'off',
[319] Fix | Delete
),
[320] Fix | Delete
'sticky' => true,
[321] Fix | Delete
),
[322] Fix | Delete
'image_height' => array(
[323] Fix | Delete
'label' => esc_html__( 'Featured Image Height', 'et_builder' ),
[324] Fix | Delete
'description' => esc_html__( 'Adjust the height of the featured image.', 'et_builder' ),
[325] Fix | Delete
'type' => 'range',
[326] Fix | Delete
'option_category' => 'layout',
[327] Fix | Delete
'tab_slug' => 'advanced',
[328] Fix | Delete
'toggle_slug' => 'width',
[329] Fix | Delete
'allowed_values' => et_builder_get_acceptable_css_string_values( 'height' ),
[330] Fix | Delete
'default' => 'auto',
[331] Fix | Delete
'default_unit' => 'px',
[332] Fix | Delete
'range_settings' => array(
[333] Fix | Delete
'min' => '0',
[334] Fix | Delete
'max' => '1000',
[335] Fix | Delete
'step' => '1',
[336] Fix | Delete
),
[337] Fix | Delete
'responsive' => true,
[338] Fix | Delete
'show_if' => array(
[339] Fix | Delete
'featured_image' => 'on',
[340] Fix | Delete
'featured_placement' => array( 'below', 'above' ),
[341] Fix | Delete
),
[342] Fix | Delete
'sticky' => true,
[343] Fix | Delete
),
[344] Fix | Delete
'image_max_height' => array(
[345] Fix | Delete
'label' => esc_html__( 'Featured Image Max Height', 'et_builder' ),
[346] Fix | Delete
'description' => esc_html__( 'Adjust the max height of the featured image.', 'et_builder' ),
[347] Fix | Delete
'type' => 'range',
[348] Fix | Delete
'option_category' => 'layout',
[349] Fix | Delete
'tab_slug' => 'advanced',
[350] Fix | Delete
'toggle_slug' => 'width',
[351] Fix | Delete
'allowed_values' => et_builder_get_acceptable_css_string_values( 'max-height' ),
[352] Fix | Delete
'default' => 'none',
[353] Fix | Delete
'default_unit' => 'px',
[354] Fix | Delete
'range_settings' => array(
[355] Fix | Delete
'min' => '0',
[356] Fix | Delete
'max' => '1000',
[357] Fix | Delete
'step' => '1',
[358] Fix | Delete
),
[359] Fix | Delete
'responsive' => true,
[360] Fix | Delete
'show_if' => array(
[361] Fix | Delete
'featured_image' => 'on',
[362] Fix | Delete
'featured_placement' => array( 'below', 'above' ),
[363] Fix | Delete
),
[364] Fix | Delete
'sticky' => true,
[365] Fix | Delete
),
[366] Fix | Delete
'image_alignment' => array(
[367] Fix | Delete
'label' => esc_html__( 'Image Alignment', 'et_builder' ),
[368] Fix | Delete
'description' => esc_html__( 'Align image to the left, right or center.', 'et_builder' ),
[369] Fix | Delete
'type' => 'align',
[370] Fix | Delete
'option_category' => 'layout',
[371] Fix | Delete
'options' => et_builder_get_text_orientation_options( array( 'justified' ) ),
[372] Fix | Delete
'tab_slug' => 'advanced',
[373] Fix | Delete
'toggle_slug' => 'image_settings',
[374] Fix | Delete
'default' => 'center',
[375] Fix | Delete
'responsive' => true,
[376] Fix | Delete
'show_if' => array(
[377] Fix | Delete
'featured_image' => 'on',
[378] Fix | Delete
'featured_placement' => array( 'below', 'above' ),
[379] Fix | Delete
'force_fullwidth' => 'off',
[380] Fix | Delete
),
[381] Fix | Delete
),
[382] Fix | Delete
'text_color' => array(
[383] Fix | Delete
'label' => esc_html__( 'Text Color', 'et_builder' ),
[384] Fix | Delete
'type' => 'select',
[385] Fix | Delete
'option_category' => 'color_option',
[386] Fix | Delete
'options' => array(
[387] Fix | Delete
'dark' => et_builder_i18n( 'Dark' ),
[388] Fix | Delete
'light' => et_builder_i18n( 'Light' ),
[389] Fix | Delete
),
[390] Fix | Delete
'default_on_front' => 'dark',
[391] Fix | Delete
'tab_slug' => 'advanced',
[392] Fix | Delete
'toggle_slug' => 'text',
[393] Fix | Delete
'hover' => 'tabs',
[394] Fix | Delete
'description' => esc_html__( 'Here you can choose the color for the Title/Meta text', 'et_builder' ),
[395] Fix | Delete
),
[396] Fix | Delete
'text_background' => array(
[397] Fix | Delete
'label' => esc_html__( 'Use Text Background Color', 'et_builder' ),
[398] Fix | Delete
'type' => 'yes_no_button',
[399] Fix | Delete
'option_category' => 'color_option',
[400] Fix | Delete
'options' => array(
[401] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[402] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[403] Fix | Delete
),
[404] Fix | Delete
'default_on_front' => 'off',
[405] Fix | Delete
'affects' => array(
[406] Fix | Delete
'text_bg_color',
[407] Fix | Delete
),
[408] Fix | Delete
'tab_slug' => 'advanced',
[409] Fix | Delete
'toggle_slug' => 'text',
[410] Fix | Delete
'description' => esc_html__( 'Here you can choose whether or not use the background color for the Title/Meta text', 'et_builder' ),
[411] Fix | Delete
),
[412] Fix | Delete
'text_bg_color' => array(
[413] Fix | Delete
'default' => 'rgba(255,255,255,0.9)',
[414] Fix | Delete
'label' => esc_html__( 'Text Background Color', 'et_builder' ),
[415] Fix | Delete
'description' => esc_html__( "Pick a color to use behind the post title text. Reducing the color's opacity will allow the background image to show through while still increasing text readability.", 'et_builder' ),
[416] Fix | Delete
'type' => 'color-alpha',
[417] Fix | Delete
'depends_show_if' => 'on',
[418] Fix | Delete
'tab_slug' => 'advanced',
[419] Fix | Delete
'toggle_slug' => 'text',
[420] Fix | Delete
'hover' => 'tabs',
[421] Fix | Delete
'mobile_options' => true,
[422] Fix | Delete
'sticky' => true,
[423] Fix | Delete
),
[424] Fix | Delete
);
[425] Fix | Delete
[426] Fix | Delete
return $fields;
[427] Fix | Delete
}
[428] Fix | Delete
[429] Fix | Delete
public function get_transition_fields_css_props() {
[430] Fix | Delete
$fields = parent::get_transition_fields_css_props();
[431] Fix | Delete
[432] Fix | Delete
$fields['text_color'] = array(
[433] Fix | Delete
'color' => implode(
[434] Fix | Delete
', ',
[435] Fix | Delete
array(
[436] Fix | Delete
'%%order_class%% .entry-title',
[437] Fix | Delete
'%%order_class%% .et_pb_title_meta_container',
[438] Fix | Delete
)
[439] Fix | Delete
),
[440] Fix | Delete
);
[441] Fix | Delete
$fields['text_bg_color'] = array( 'background-color' => '%%order_class%% .et_pb_title_container' );
[442] Fix | Delete
$fields['image_height'] = array( 'height' => '%%order_class%% .et_pb_title_featured_container img' );
[443] Fix | Delete
$fields['image_max_height'] = array( 'max-height' => '%%order_class%% .et_pb_title_featured_container img' );
[444] Fix | Delete
$fields['image_width'] = array( 'width' => '%%order_class%% .et_pb_title_featured_container' );
[445] Fix | Delete
$fields['image_max_width'] = array( 'max-width' => '%%order_class%% .et_pb_title_featured_container' );
[446] Fix | Delete
[447] Fix | Delete
return $fields;
[448] Fix | Delete
}
[449] Fix | Delete
[450] Fix | Delete
/**
[451] Fix | Delete
* Renders the module output.
[452] Fix | Delete
*
[453] Fix | Delete
* @param array $attrs List of attributes.
[454] Fix | Delete
* @param string $content Content being processed.
[455] Fix | Delete
* @param string $render_slug Slug of module that is used for rendering output.
[456] Fix | Delete
*
[457] Fix | Delete
* @return string
[458] Fix | Delete
*/
[459] Fix | Delete
public function render( $attrs, $content, $render_slug ) {
[460] Fix | Delete
$multi_view = et_pb_multi_view_options( $this );
[461] Fix | Delete
$featured_placement = $this->props['featured_placement'];
[462] Fix | Delete
$text_color = $this->props['text_color'];
[463] Fix | Delete
$text_color_hover = et_pb_hover_options()->get_value( 'text_color', $this->props );
[464] Fix | Delete
$text_background = $this->props['text_background'];
[465] Fix | Delete
$header_level = $this->props['title_level'];
[466] Fix | Delete
$post_id = get_the_ID();
[467] Fix | Delete
[468] Fix | Delete
// display the shortcode only on singlular pages
[469] Fix | Delete
if ( ! is_singular() && ! is_et_pb_preview() ) {
[470] Fix | Delete
$post_id = 0;
[471] Fix | Delete
}
[472] Fix | Delete
[473] Fix | Delete
$this->process_additional_options( $render_slug );
[474] Fix | Delete
[475] Fix | Delete
$output = '';
[476] Fix | Delete
$featured_image_output = '';
[477] Fix | Delete
$parallax_image_background = $this->get_parallax_image_background();
[478] Fix | Delete
[479] Fix | Delete
if ( $post_id && $multi_view->has_value( 'featured_image', 'on' ) && ( 'above' === $featured_placement || 'below' === $featured_placement ) ) {
[480] Fix | Delete
$post_thumbnail_id = get_post_thumbnail_id( $post_id );
[481] Fix | Delete
$featured_image_src = et_()->array_get( wp_get_attachment_image_src( $post_thumbnail_id, 'full' ), 0 );
[482] Fix | Delete
$featured_image_alt = get_post_meta( $post_thumbnail_id, '_wp_attachment_image_alt', true );
[483] Fix | Delete
$featured_image_title = get_the_title( $post_thumbnail_id );
[484] Fix | Delete
$featured_image_class = et_pb_media_options()->get_image_attachment_class( $this->props, '', $post_thumbnail_id );
[485] Fix | Delete
$featured_image_attrs = array(
[486] Fix | Delete
'src' => $featured_image_src,
[487] Fix | Delete
'alt' => $featured_image_alt,
[488] Fix | Delete
'title' => $featured_image_title,
[489] Fix | Delete
);
[490] Fix | Delete
[491] Fix | Delete
if ( ! empty( $featured_image_class ) ) {
[492] Fix | Delete
$featured_image_attrs['class'] = esc_attr( $featured_image_class );
[493] Fix | Delete
}
[494] Fix | Delete
[495] Fix | Delete
$featured_image_content = $multi_view->render_element(
[496] Fix | Delete
array(
[497] Fix | Delete
'tag' => 'img',
[498] Fix | Delete
'attrs' => $featured_image_attrs,
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function