Edit File by line

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