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