Edit File by line
/home/barbar84/www/wp-conte.../themes/Divi/includes/builder/module
File: PricingTablesItem.php
<?php
[0] Fix | Delete
[1] Fix | Delete
class ET_Builder_Module_Pricing_Tables_Item extends ET_Builder_Module {
[2] Fix | Delete
function init() {
[3] Fix | Delete
$this->name = esc_html__( 'Pricing Table', 'et_builder' );
[4] Fix | Delete
$this->plural = esc_html__( 'Pricing Tables', 'et_builder' );
[5] Fix | Delete
$this->slug = 'et_pb_pricing_table';
[6] Fix | Delete
$this->vb_support = 'on';
[7] Fix | Delete
$this->main_css_element = '%%order_class%%';
[8] Fix | Delete
$this->type = 'child';
[9] Fix | Delete
$this->child_title_var = 'title';
[10] Fix | Delete
$this->advanced_setting_title_text = esc_html__( 'New Pricing Table', 'et_builder' );
[11] Fix | Delete
$this->settings_text = esc_html__( 'Pricing Table Settings', 'et_builder' );
[12] Fix | Delete
[13] Fix | Delete
$this->settings_modal_toggles = array(
[14] Fix | Delete
'general' => array(
[15] Fix | Delete
'toggles' => array(
[16] Fix | Delete
'main_content' => et_builder_i18n( 'Text' ),
[17] Fix | Delete
'elements' => et_builder_i18n( 'Elements' ),
[18] Fix | Delete
),
[19] Fix | Delete
),
[20] Fix | Delete
'advanced' => array(
[21] Fix | Delete
'toggles' => array(
[22] Fix | Delete
'layout' => et_builder_i18n( 'Layout' ),
[23] Fix | Delete
'bullet' => esc_html__( 'Bullet', 'et_builder' ),
[24] Fix | Delete
),
[25] Fix | Delete
),
[26] Fix | Delete
);
[27] Fix | Delete
[28] Fix | Delete
$this->advanced_fields = array(
[29] Fix | Delete
'borders' => array(
[30] Fix | Delete
'default' => array(
[31] Fix | Delete
'css' => array(
[32] Fix | Delete
'main' => array(
[33] Fix | Delete
'border_radii' => '.et_pb_pricing .et_pb_pricing_table%%order_class%%',
[34] Fix | Delete
'border_styles' => '.et_pb_pricing .et_pb_pricing_table%%order_class%%',
[35] Fix | Delete
),
[36] Fix | Delete
),
[37] Fix | Delete
'defaults' => array(
[38] Fix | Delete
'border_radii' => 'on||||',
[39] Fix | Delete
'border_styles' => array(
[40] Fix | Delete
'width' => '1px',
[41] Fix | Delete
'color' => '#bebebe',
[42] Fix | Delete
'style' => 'solid',
[43] Fix | Delete
),
[44] Fix | Delete
),
[45] Fix | Delete
),
[46] Fix | Delete
'price' => array(
[47] Fix | Delete
'css' => array(
[48] Fix | Delete
'main' => array(
[49] Fix | Delete
'border_radii' => '.et_pb_pricing %%order_class%% .et_pb_pricing_content_top',
[50] Fix | Delete
'border_styles' => '.et_pb_pricing %%order_class%% .et_pb_pricing_content_top',
[51] Fix | Delete
),
[52] Fix | Delete
),
[53] Fix | Delete
'option_category' => 'border',
[54] Fix | Delete
'tab_slug' => 'advanced',
[55] Fix | Delete
'toggle_slug' => 'price',
[56] Fix | Delete
'defaults' => array(
[57] Fix | Delete
'border_radii' => 'on||||',
[58] Fix | Delete
'border_styles' => array(
[59] Fix | Delete
'width' => '0px',
[60] Fix | Delete
'color' => '#bebebe',
[61] Fix | Delete
'style' => 'solid',
[62] Fix | Delete
),
[63] Fix | Delete
'composite' => array(
[64] Fix | Delete
'border_bottom' => array(
[65] Fix | Delete
'border_width_bottom' => '1px',
[66] Fix | Delete
),
[67] Fix | Delete
),
[68] Fix | Delete
),
[69] Fix | Delete
),
[70] Fix | Delete
),
[71] Fix | Delete
'fonts' => array(
[72] Fix | Delete
'header' => array(
[73] Fix | Delete
'label' => et_builder_i18n( 'Title' ),
[74] Fix | Delete
'css' => array(
[75] Fix | Delete
'main' => "{$this->main_css_element} .et_pb_pricing_heading h2, {$this->main_css_element} .et_pb_pricing_heading h1.et_pb_pricing_title, {$this->main_css_element} .et_pb_pricing_heading h3.et_pb_pricing_title, {$this->main_css_element} .et_pb_pricing_heading h4.et_pb_pricing_title, {$this->main_css_element} .et_pb_pricing_heading h5.et_pb_pricing_title, {$this->main_css_element} .et_pb_pricing_heading h6.et_pb_pricing_title,
[76] Fix | Delete
{$this->main_css_element}.et_pb_featured_table .et_pb_pricing_heading h2, {$this->main_css_element}.et_pb_featured_table .et_pb_pricing_heading h1.et_pb_pricing_title, {$this->main_css_element}.et_pb_featured_table .et_pb_pricing_heading h3.et_pb_pricing_title, {$this->main_css_element}.et_pb_featured_table .et_pb_pricing_heading h4.et_pb_pricing_title, {$this->main_css_element}.et_pb_featured_table .et_pb_pricing_heading h5.et_pb_pricing_title, {$this->main_css_element}.et_pb_featured_table .et_pb_pricing_heading h6.et_pb_pricing_title",
[77] Fix | Delete
'important' => 'all',
[78] Fix | Delete
),
[79] Fix | Delete
'line_height' => array(
[80] Fix | Delete
'range_settings' => array(
[81] Fix | Delete
'min' => '1',
[82] Fix | Delete
'max' => '100',
[83] Fix | Delete
'step' => '1',
[84] Fix | Delete
),
[85] Fix | Delete
),
[86] Fix | Delete
'header_level' => array(
[87] Fix | Delete
'default' => 'h2',
[88] Fix | Delete
),
[89] Fix | Delete
),
[90] Fix | Delete
'body' => array(
[91] Fix | Delete
'label' => et_builder_i18n( 'Body' ),
[92] Fix | Delete
'css' => array(
[93] Fix | Delete
'main' => "{$this->main_css_element} .et_pb_pricing li",
[94] Fix | Delete
'limited_main' => "{$this->main_css_element} .et_pb_pricing li, {$this->main_css_element} .et_pb_pricing li span, {$this->main_css_element} .et_pb_pricing li a",
[95] Fix | Delete
),
[96] Fix | Delete
'line_height' => array(
[97] Fix | Delete
'range_settings' => array(
[98] Fix | Delete
'min' => '1',
[99] Fix | Delete
'max' => '100',
[100] Fix | Delete
'step' => '1',
[101] Fix | Delete
),
[102] Fix | Delete
),
[103] Fix | Delete
'block_elements' => array(
[104] Fix | Delete
'tabbed_subtoggles' => true,
[105] Fix | Delete
'bb_icons_support' => true,
[106] Fix | Delete
),
[107] Fix | Delete
),
[108] Fix | Delete
'subheader' => array(
[109] Fix | Delete
'label' => esc_html__( 'Subtitle', 'et_builder' ),
[110] Fix | Delete
'css' => array(
[111] Fix | Delete
'main' => "{$this->main_css_element} .et_pb_pricing_heading .et_pb_best_value",
[112] Fix | Delete
),
[113] Fix | Delete
'line_height' => array(
[114] Fix | Delete
'range_settings' => array(
[115] Fix | Delete
'min' => '1',
[116] Fix | Delete
'max' => '100',
[117] Fix | Delete
'step' => '1',
[118] Fix | Delete
),
[119] Fix | Delete
),
[120] Fix | Delete
),
[121] Fix | Delete
'price' => array(
[122] Fix | Delete
'label' => esc_html__( 'Price', 'et_builder' ),
[123] Fix | Delete
'css' => array(
[124] Fix | Delete
'main' => "{$this->main_css_element} .et_pb_et_price .et_pb_sum",
[125] Fix | Delete
'text_align' => "{$this->main_css_element} .et_pb_pricing_content_top",
[126] Fix | Delete
),
[127] Fix | Delete
'line_height' => array(
[128] Fix | Delete
'range_settings' => array(
[129] Fix | Delete
'min' => '1',
[130] Fix | Delete
'max' => '100',
[131] Fix | Delete
'step' => '1',
[132] Fix | Delete
),
[133] Fix | Delete
),
[134] Fix | Delete
'options_priority' => array(
[135] Fix | Delete
'price_text_color' => 8,
[136] Fix | Delete
),
[137] Fix | Delete
),
[138] Fix | Delete
'currency_frequency' => array(
[139] Fix | Delete
'label' => esc_html__( 'Currency &amp; Frequency', 'et_builder' ),
[140] Fix | Delete
'css' => array(
[141] Fix | Delete
'main' => "{$this->main_css_element} .et_pb_dollar_sign, {$this->main_css_element} .et_pb_frequency",
[142] Fix | Delete
),
[143] Fix | Delete
'hide_text_align' => true,
[144] Fix | Delete
),
[145] Fix | Delete
'excluded' => array(
[146] Fix | Delete
'label' => esc_html__( 'Excluded Item', 'et_builder' ),
[147] Fix | Delete
'css' => array(
[148] Fix | Delete
'main' => '%%order_class%% ul.et_pb_pricing li.et_pb_not_available, %%order_class%% ul.et_pb_pricing li.et_pb_not_available span, %%order_class%% ul.et_pb_pricing li.et_pb_not_available a',
[149] Fix | Delete
),
[150] Fix | Delete
'line_height' => array(
[151] Fix | Delete
'range_settings' => array(
[152] Fix | Delete
'min' => '1',
[153] Fix | Delete
'max' => '100',
[154] Fix | Delete
'step' => '1',
[155] Fix | Delete
),
[156] Fix | Delete
),
[157] Fix | Delete
'font_size' => array(
[158] Fix | Delete
'default' => absint( et_get_option( 'body_font_size', '14' ) ) . 'px',
[159] Fix | Delete
),
[160] Fix | Delete
),
[161] Fix | Delete
),
[162] Fix | Delete
'background' => array(
[163] Fix | Delete
'css' => array(
[164] Fix | Delete
'main' => "{$this->main_css_element}.et_pb_pricing_table",
[165] Fix | Delete
),
[166] Fix | Delete
'settings' => array(
[167] Fix | Delete
'color' => 'alpha',
[168] Fix | Delete
),
[169] Fix | Delete
),
[170] Fix | Delete
'button' => array(
[171] Fix | Delete
'button' => array(
[172] Fix | Delete
'label' => et_builder_i18n( 'Button' ),
[173] Fix | Delete
'css' => array(
[174] Fix | Delete
'main' => ".et_pb_pricing {$this->main_css_element} .et_pb_button",
[175] Fix | Delete
'limited_main' => ".et_pb_pricing {$this->main_css_element} .et_pb_pricing_table_button.et_pb_button",
[176] Fix | Delete
'alignment' => ".et_pb_pricing {$this->main_css_element} .et_pb_button_wrapper",
[177] Fix | Delete
),
[178] Fix | Delete
'use_alignment' => true,
[179] Fix | Delete
'box_shadow' => array(
[180] Fix | Delete
'css' => array(
[181] Fix | Delete
'main' => '%%order_class%% .et_pb_button.et_pb_pricing_table_button',
[182] Fix | Delete
),
[183] Fix | Delete
),
[184] Fix | Delete
),
[185] Fix | Delete
),
[186] Fix | Delete
'margin_padding' => array(
[187] Fix | Delete
'use_margin' => false,
[188] Fix | Delete
'css' => array(
[189] Fix | Delete
'important' => 'all', // Need to overwrite pricing table's styling
[190] Fix | Delete
'main' => '.et_pb_pricing %%order_class%% .et_pb_pricing_heading, .et_pb_pricing %%order_class%% .et_pb_pricing_content_top, .et_pb_pricing %%order_class%% .et_pb_pricing_content',
[191] Fix | Delete
[192] Fix | Delete
'padding-right' => '%%order_class%% .et_pb_button_wrapper',
[193] Fix | Delete
'padding-bottom' => '.et_pb_pricing %%order_class%%',
[194] Fix | Delete
'padding-left' => '%%order_class%% .et_pb_button_wrapper',
[195] Fix | Delete
),
[196] Fix | Delete
),
[197] Fix | Delete
'text' => array(
[198] Fix | Delete
'css' => array(
[199] Fix | Delete
'text_orientation' => '%%order_class%%.et_pb_pricing_table, %%order_class%% .et_pb_pricing_content',
[200] Fix | Delete
'text_shadow' => '%%order_class%% .et_pb_pricing_heading, %%order_class%% .et_pb_pricing_content_top, %%order_class%% .et_pb_pricing_content',
[201] Fix | Delete
),
[202] Fix | Delete
),
[203] Fix | Delete
'max_width' => false,
[204] Fix | Delete
'height' => false,
[205] Fix | Delete
'sticky' => false,
[206] Fix | Delete
);
[207] Fix | Delete
[208] Fix | Delete
$this->custom_css_fields = array(
[209] Fix | Delete
'pricing_heading' => array(
[210] Fix | Delete
'label' => esc_html__( 'Pricing Heading', 'et_builder' ),
[211] Fix | Delete
'selector' => '.et_pb_pricing_heading',
[212] Fix | Delete
),
[213] Fix | Delete
'pricing_title' => array(
[214] Fix | Delete
'label' => esc_html__( 'Pricing Title', 'et_builder' ),
[215] Fix | Delete
'selector' => '.et_pb_pricing_heading h2',
[216] Fix | Delete
),
[217] Fix | Delete
'pricing_subtitle' => array(
[218] Fix | Delete
'label' => esc_html__( 'Pricing Subtitle', 'et_builder' ),
[219] Fix | Delete
'selector' => '.et_pb_pricing_heading .et_pb_best_value',
[220] Fix | Delete
),
[221] Fix | Delete
'pricing_top' => array(
[222] Fix | Delete
'label' => esc_html__( 'Pricing Top', 'et_builder' ),
[223] Fix | Delete
'selector' => '.et_pb_pricing_content_top',
[224] Fix | Delete
),
[225] Fix | Delete
'price' => array(
[226] Fix | Delete
'label' => esc_html__( 'Price', 'et_builder' ),
[227] Fix | Delete
'selector' => '.et_pb_et_price',
[228] Fix | Delete
),
[229] Fix | Delete
'currency' => array(
[230] Fix | Delete
'label' => esc_html__( 'Currency', 'et_builder' ),
[231] Fix | Delete
'selector' => '.et_pb_dollar_sign',
[232] Fix | Delete
),
[233] Fix | Delete
'frequency' => array(
[234] Fix | Delete
'label' => esc_html__( 'Frequency', 'et_builder' ),
[235] Fix | Delete
'selector' => '.et_pb_frequency',
[236] Fix | Delete
),
[237] Fix | Delete
'pricing_content' => array(
[238] Fix | Delete
'label' => esc_html__( 'Pricing Content', 'et_builder' ),
[239] Fix | Delete
'selector' => '.et_pb_pricing_content',
[240] Fix | Delete
),
[241] Fix | Delete
'pricing_item' => array(
[242] Fix | Delete
'label' => esc_html__( 'Pricing Item', 'et_builder' ),
[243] Fix | Delete
'selector' => 'ul.et_pb_pricing li',
[244] Fix | Delete
),
[245] Fix | Delete
'pricing_item_excluded' => array(
[246] Fix | Delete
'label' => esc_html__( 'Excluded Item', 'et_builder' ),
[247] Fix | Delete
'selector' => 'ul.et_pb_pricing li.et_pb_not_available',
[248] Fix | Delete
),
[249] Fix | Delete
'pricing_button' => array(
[250] Fix | Delete
'label' => esc_html__( 'Pricing Button', 'et_builder' ),
[251] Fix | Delete
'selector' => '.et_pb_pricing_table_button',
[252] Fix | Delete
),
[253] Fix | Delete
);
[254] Fix | Delete
}
[255] Fix | Delete
[256] Fix | Delete
function get_fields() {
[257] Fix | Delete
$fields = array(
[258] Fix | Delete
'featured' => array(
[259] Fix | Delete
'label' => esc_html__( 'Make This Table Featured', 'et_builder' ),
[260] Fix | Delete
'type' => 'yes_no_button',
[261] Fix | Delete
'option_category' => 'basic_option',
[262] Fix | Delete
'options' => array(
[263] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[264] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[265] Fix | Delete
),
[266] Fix | Delete
'default_on_front' => 'off',
[267] Fix | Delete
'tab_slug' => 'advanced',
[268] Fix | Delete
'toggle_slug' => 'layout',
[269] Fix | Delete
'description' => esc_html__( 'Featuring a table will make it stand out from the rest.', 'et_builder' ),
[270] Fix | Delete
),
[271] Fix | Delete
'title' => array(
[272] Fix | Delete
'label' => et_builder_i18n( 'Title' ),
[273] Fix | Delete
'type' => 'text',
[274] Fix | Delete
'option_category' => 'basic_option',
[275] Fix | Delete
'description' => esc_html__( 'Define a title for the pricing table.', 'et_builder' ),
[276] Fix | Delete
'toggle_slug' => 'main_content',
[277] Fix | Delete
'dynamic_content' => 'text',
[278] Fix | Delete
'mobile_options' => true,
[279] Fix | Delete
'hover' => 'tabs',
[280] Fix | Delete
),
[281] Fix | Delete
'subtitle' => array(
[282] Fix | Delete
'label' => esc_html__( 'Subtitle', 'et_builder' ),
[283] Fix | Delete
'type' => 'text',
[284] Fix | Delete
'option_category' => 'basic_option',
[285] Fix | Delete
'description' => esc_html__( 'Define a sub title for the table if desired.', 'et_builder' ),
[286] Fix | Delete
'toggle_slug' => 'main_content',
[287] Fix | Delete
'dynamic_content' => 'text',
[288] Fix | Delete
'mobile_options' => true,
[289] Fix | Delete
'hover' => 'tabs',
[290] Fix | Delete
),
[291] Fix | Delete
'currency' => array(
[292] Fix | Delete
'label' => esc_html__( 'Currency', 'et_builder' ),
[293] Fix | Delete
'type' => 'text',
[294] Fix | Delete
'option_category' => 'basic_option',
[295] Fix | Delete
'description' => esc_html__( 'Input your desired currency symbol here.', 'et_builder' ),
[296] Fix | Delete
'toggle_slug' => 'main_content',
[297] Fix | Delete
'dynamic_content' => 'text',
[298] Fix | Delete
'mobile_options' => true,
[299] Fix | Delete
'hover' => 'tabs',
[300] Fix | Delete
),
[301] Fix | Delete
'per' => array(
[302] Fix | Delete
'label' => esc_html__( 'Frequency', 'et_builder' ),
[303] Fix | Delete
'type' => 'text',
[304] Fix | Delete
'option_category' => 'basic_option',
[305] Fix | Delete
'description' => esc_html__( 'If your pricing is subscription based, input the subscription payment cycle here.', 'et_builder' ),
[306] Fix | Delete
'toggle_slug' => 'main_content',
[307] Fix | Delete
'dynamic_content' => 'text',
[308] Fix | Delete
'mobile_options' => true,
[309] Fix | Delete
'hover' => 'tabs',
[310] Fix | Delete
),
[311] Fix | Delete
'sum' => array(
[312] Fix | Delete
'label' => esc_html__( 'Price', 'et_builder' ),
[313] Fix | Delete
'type' => 'text',
[314] Fix | Delete
'option_category' => 'basic_option',
[315] Fix | Delete
'description' => esc_html__( 'Input the value of the product here.', 'et_builder' ),
[316] Fix | Delete
'toggle_slug' => 'main_content',
[317] Fix | Delete
'dynamic_content' => 'text',
[318] Fix | Delete
'mobile_options' => true,
[319] Fix | Delete
'hover' => 'tabs',
[320] Fix | Delete
),
[321] Fix | Delete
'button_url' => array(
[322] Fix | Delete
'label' => esc_html__( 'Button Link URL', 'et_builder' ),
[323] Fix | Delete
'type' => 'text',
[324] Fix | Delete
'option_category' => 'basic_option',
[325] Fix | Delete
'description' => esc_html__( 'Input the destination URL for the signup button.', 'et_builder' ),
[326] Fix | Delete
'toggle_slug' => 'link_options',
[327] Fix | Delete
'dynamic_content' => 'url',
[328] Fix | Delete
),
[329] Fix | Delete
'url_new_window' => array(
[330] Fix | Delete
'label' => esc_html__( 'Button Link Target', 'et_builder' ),
[331] Fix | Delete
'type' => 'select',
[332] Fix | Delete
'option_category' => 'configuration',
[333] Fix | Delete
'options' => array(
[334] Fix | Delete
'off' => esc_html__( 'In The Same Window', 'et_builder' ),
[335] Fix | Delete
'on' => esc_html__( 'In The New Tab', 'et_builder' ),
[336] Fix | Delete
),
[337] Fix | Delete
'toggle_slug' => 'link_options',
[338] Fix | Delete
'description' => esc_html__( 'Here you can choose whether or not your link opens in a new window', 'et_builder' ),
[339] Fix | Delete
'default_on_front' => 'off',
[340] Fix | Delete
),
[341] Fix | Delete
'button_text' => array(
[342] Fix | Delete
'label' => et_builder_i18n( 'Button' ),
[343] Fix | Delete
'type' => 'text',
[344] Fix | Delete
'option_category' => 'basic_option',
[345] Fix | Delete
'description' => esc_html__( 'Adjust the text used from the signup button.', 'et_builder' ),
[346] Fix | Delete
'toggle_slug' => 'main_content',
[347] Fix | Delete
'dynamic_content' => 'text',
[348] Fix | Delete
'mobile_options' => true,
[349] Fix | Delete
'hover' => 'tabs',
[350] Fix | Delete
),
[351] Fix | Delete
'content' => array(
[352] Fix | Delete
'label' => et_builder_i18n( 'Body' ),
[353] Fix | Delete
'type' => 'tiny_mce',
[354] Fix | Delete
'option_category' => 'basic_option',
[355] Fix | Delete
'description' => sprintf(
[356] Fix | Delete
'%1$s<br/> + %2$s<br/> - %3$s',
[357] Fix | Delete
esc_html__( 'Input a list of features that are/are not included in the product. Separate items on a new line, and begin with either a + or - symbol: ', 'et_builder' ),
[358] Fix | Delete
esc_html__( 'Included option', 'et_builder' ),
[359] Fix | Delete
esc_html__( 'Excluded option', 'et_builder' )
[360] Fix | Delete
),
[361] Fix | Delete
'toggle_slug' => 'main_content',
[362] Fix | Delete
'dynamic_content' => 'text',
[363] Fix | Delete
'mobile_options' => true,
[364] Fix | Delete
'hover' => 'tabs',
[365] Fix | Delete
),
[366] Fix | Delete
'bullet_color' => array(
[367] Fix | Delete
'label' => esc_html__( 'Bullet Color', 'et_builder' ),
[368] Fix | Delete
'description' => esc_html__( "Pick a color to use for the bullets that appear next to each list item within the pricing table's feature area.", 'et_builder' ),
[369] Fix | Delete
'type' => 'color-alpha',
[370] Fix | Delete
'custom_color' => true,
[371] Fix | Delete
'tab_slug' => 'advanced',
[372] Fix | Delete
'toggle_slug' => 'bullet',
[373] Fix | Delete
'hover' => 'tabs',
[374] Fix | Delete
'mobile_options' => true,
[375] Fix | Delete
'sticky' => true,
[376] Fix | Delete
),
[377] Fix | Delete
'price_background_color' => array(
[378] Fix | Delete
'label' => esc_html__( 'Pricing Area Background Color', 'et_builder' ),
[379] Fix | Delete
'description' => esc_html__( 'Pick a color to use for the background area that appears behind the pricing text.', 'et_builder' ),
[380] Fix | Delete
'type' => 'color-alpha',
[381] Fix | Delete
'custom_color' => true,
[382] Fix | Delete
'tab_slug' => 'advanced',
[383] Fix | Delete
'toggle_slug' => 'price',
[384] Fix | Delete
'priority' => 21,
[385] Fix | Delete
'hover' => 'tabs',
[386] Fix | Delete
'mobile_options' => true,
[387] Fix | Delete
'sticky' => true,
[388] Fix | Delete
),
[389] Fix | Delete
'header_background_color' => array(
[390] Fix | Delete
'label' => esc_html__( 'Table Header Background Color', 'et_builder' ),
[391] Fix | Delete
'type' => 'color-alpha',
[392] Fix | Delete
'custom_color' => true,
[393] Fix | Delete
'tab_slug' => 'advanced',
[394] Fix | Delete
'toggle_slug' => 'header',
[395] Fix | Delete
'hover' => 'tabs',
[396] Fix | Delete
'mobile_options' => true,
[397] Fix | Delete
'sticky' => true,
[398] Fix | Delete
),
[399] Fix | Delete
);
[400] Fix | Delete
return $fields;
[401] Fix | Delete
}
[402] Fix | Delete
[403] Fix | Delete
public function get_transition_fields_css_props() {
[404] Fix | Delete
$fields = parent::get_transition_fields_css_props();
[405] Fix | Delete
[406] Fix | Delete
$fields['bullet_color'] = array( 'border-color' => '%%order_class%% ul.et_pb_pricing li span:before' );
[407] Fix | Delete
$fields['header_background_color'] = array( 'background-color' => '%%order_class%% .et_pb_pricing_heading' );
[408] Fix | Delete
$fields['price_background_color'] = array( 'background-color' => '%%order_class%% .et_pb_pricing_content_top' );
[409] Fix | Delete
[410] Fix | Delete
return $fields;
[411] Fix | Delete
}
[412] Fix | Delete
[413] Fix | Delete
/**
[414] Fix | Delete
* Inherit value from pricing tables (parent) module
[415] Fix | Delete
*
[416] Fix | Delete
* @since 4.6.0
[417] Fix | Delete
*/
[418] Fix | Delete
public function maybe_inherit_values() {
[419] Fix | Delete
global $et_pb_pricing_tables_sticky_transition;
[420] Fix | Delete
[421] Fix | Delete
// Module item has no sticky option so we can go ahead and inherit parent's sticky attr.
[422] Fix | Delete
$this->props['sticky_transition'] = $et_pb_pricing_tables_sticky_transition;
[423] Fix | Delete
}
[424] Fix | Delete
[425] Fix | Delete
/**
[426] Fix | Delete
* Generates the module's HTML output based on {@see self::$props}.
[427] Fix | Delete
*
[428] Fix | Delete
* @since 1.0
[429] Fix | Delete
*
[430] Fix | Delete
* @param array $attrs List of unprocessed attributes.
[431] Fix | Delete
* @param string $content Content being processed.
[432] Fix | Delete
* @param string $render_slug Slug of module that is used for rendering output.
[433] Fix | Delete
*
[434] Fix | Delete
* @return string The module's HTML output.
[435] Fix | Delete
*/
[436] Fix | Delete
public function render( $attrs, $content, $render_slug ) {
[437] Fix | Delete
global $et_pb_pricing_tables_num,
[438] Fix | Delete
$et_pb_pricing_tables_icon,
[439] Fix | Delete
$et_pb_pricing_tables_icon_tablet,
[440] Fix | Delete
$et_pb_pricing_tables_icon_phone,
[441] Fix | Delete
$et_pb_pricing_tables_button_rel,
[442] Fix | Delete
$et_pb_pricing_tables_header_level,
[443] Fix | Delete
$et_pb_pricing_tables_sticky;
[444] Fix | Delete
[445] Fix | Delete
$multi_view = et_pb_multi_view_options( $this );
[446] Fix | Delete
$featured = $this->props['featured'];
[447] Fix | Delete
$button_url = $this->props['button_url'];
[448] Fix | Delete
$button_rel = $this->props['button_rel'];
[449] Fix | Delete
$button_text = $this->_esc_attr( 'button_text', 'limited' );
[450] Fix | Delete
$url_new_window = $this->props['url_new_window'];
[451] Fix | Delete
$button_custom = $this->props['custom_button'];
[452] Fix | Delete
$header_level = $this->props['header_level'];
[453] Fix | Delete
$body_text_align_values = et_pb_responsive_options()->get_property_values( $this->props, 'body_text_align' );
[454] Fix | Delete
[455] Fix | Delete
$custom_icon_values = et_pb_responsive_options()->get_property_values( $this->props, 'button_icon' );
[456] Fix | Delete
$custom_icon = isset( $custom_icon_values['desktop'] ) ? $custom_icon_values['desktop'] : '';
[457] Fix | Delete
$custom_icon_tablet = isset( $custom_icon_values['tablet'] ) ? $custom_icon_values['tablet'] : '';
[458] Fix | Delete
$custom_icon_phone = isset( $custom_icon_values['phone'] ) ? $custom_icon_values['phone'] : '';
[459] Fix | Delete
[460] Fix | Delete
// Overwrite button rel with pricin tables' button_rel if needed
[461] Fix | Delete
if ( in_array( $button_rel, array( '', 'off|off|off|off|off' ) ) && '' !== $et_pb_pricing_tables_button_rel ) {
[462] Fix | Delete
$button_rel = $et_pb_pricing_tables_button_rel;
[463] Fix | Delete
}
[464] Fix | Delete
[465] Fix | Delete
$et_pb_pricing_tables_num++;
[466] Fix | Delete
[467] Fix | Delete
$custom_table_icon = 'on' === $button_custom && '' !== $custom_icon ? $custom_icon : $et_pb_pricing_tables_icon;
[468] Fix | Delete
$custom_table_icon_tablet = 'on' === $button_custom && '' !== $custom_icon_tablet ? $custom_icon_tablet : $et_pb_pricing_tables_icon_tablet;
[469] Fix | Delete
$custom_table_icon_phone = 'on' === $button_custom && '' !== $custom_icon_phone ? $custom_icon_phone : $et_pb_pricing_tables_icon_phone;
[470] Fix | Delete
[471] Fix | Delete
// Bullet color.
[472] Fix | Delete
$this->generate_styles(
[473] Fix | Delete
array(
[474] Fix | Delete
'base_attr_name' => 'bullet_color',
[475] Fix | Delete
'selector' => '%%order_class%% .et_pb_pricing_content ul.et_pb_pricing li span:before',
[476] Fix | Delete
'hover_selector' => '%%order_class%% .et_pb_pricing_content ul.et_pb_pricing:hover li span:before',
[477] Fix | Delete
'css_property' => 'border-color',
[478] Fix | Delete
'render_slug' => $render_slug,
[479] Fix | Delete
'type' => 'color',
[480] Fix | Delete
[481] Fix | Delete
// Selector begins with current module item selector so this will never be sticky.
[482] Fix | Delete
'is_sticky_module' => false,
[483] Fix | Delete
)
[484] Fix | Delete
);
[485] Fix | Delete
[486] Fix | Delete
// Header Background Color. In the parent item, header BG color doesn't has higher selector
[487] Fix | Delete
// because it uses .et_pb_pricing_table as hover location. So, we should append the same
[488] Fix | Delete
// parent class here because there is no class can be used to make current selector higher.
[489] Fix | Delete
$this->generate_styles(
[490] Fix | Delete
array(
[491] Fix | Delete
'base_attr_name' => 'header_background_color',
[492] Fix | Delete
'selector' => '.et_pb_pricing %%order_class%%.et_pb_pricing_table .et_pb_pricing_heading',
[493] Fix | Delete
'hover_selector' => '.et_pb_pricing %%order_class%%.et_pb_pricing_table:hover .et_pb_pricing_heading',
[494] Fix | Delete
'sticky_pseudo_selector_location' => 'prefix',
[495] Fix | Delete
'css_property' => 'background-color',
[496] Fix | Delete
'important' => true,
[497] Fix | Delete
'render_slug' => $render_slug,
[498] Fix | Delete
'type' => 'color',
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function