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: Signup.php
<?php
[0] Fix | Delete
[1] Fix | Delete
class ET_Builder_Module_Signup extends ET_Builder_Module_Type_WithSpamProtection {
[2] Fix | Delete
[3] Fix | Delete
protected static $_providers;
[4] Fix | Delete
[5] Fix | Delete
public static $enabled_providers;
[6] Fix | Delete
[7] Fix | Delete
public $child_slug = 'et_pb_signup_custom_field';
[8] Fix | Delete
[9] Fix | Delete
public $module_items_config = array(
[10] Fix | Delete
'toggle_slug' => 'fields',
[11] Fix | Delete
'location' => 'bottom',
[12] Fix | Delete
'show_if' => array(
[13] Fix | Delete
'use_custom_fields' => 'on',
[14] Fix | Delete
),
[15] Fix | Delete
'show_if_not' => array(
[16] Fix | Delete
'function.hasPredefinedFields' => 'off',
[17] Fix | Delete
'${provider}_list' => array( '0|none', '' ),
[18] Fix | Delete
),
[19] Fix | Delete
);
[20] Fix | Delete
[21] Fix | Delete
function init() {
[22] Fix | Delete
parent::init();
[23] Fix | Delete
[24] Fix | Delete
$this->name = esc_html__( 'Email Optin', 'et_builder' );
[25] Fix | Delete
$this->plural = esc_html__( 'Email Optins', 'et_builder' );
[26] Fix | Delete
$this->slug = 'et_pb_signup';
[27] Fix | Delete
$this->vb_support = 'on';
[28] Fix | Delete
[29] Fix | Delete
$this->child_item_text = esc_html__( 'Custom Field', 'et_builder' );
[30] Fix | Delete
[31] Fix | Delete
$providers = self::providers()->names_by_slug();
[32] Fix | Delete
$providers['feedburner'] = 'FeedBurner';
[33] Fix | Delete
[34] Fix | Delete
self::$enabled_providers = apply_filters( 'et_builder_module_signup_enabled_providers', $providers );
[35] Fix | Delete
[36] Fix | Delete
ksort( self::$enabled_providers );
[37] Fix | Delete
[38] Fix | Delete
$this->main_css_element = '%%order_class%%.et_pb_subscribe';
[39] Fix | Delete
[40] Fix | Delete
$this->settings_modal_toggles = array(
[41] Fix | Delete
'general' => array(
[42] Fix | Delete
'toggles' => array(
[43] Fix | Delete
'main_content' => et_builder_i18n( 'Text' ),
[44] Fix | Delete
'provider' => esc_html__( 'Email Account', 'et_builder' ),
[45] Fix | Delete
'fields' => esc_html__( 'Fields', 'et_builder' ),
[46] Fix | Delete
'success_action' => esc_html__( 'Success Action', 'et_builder' ),
[47] Fix | Delete
'spam' => esc_html__( 'Spam Protection', 'et_builder' ),
[48] Fix | Delete
),
[49] Fix | Delete
),
[50] Fix | Delete
'advanced' => array(
[51] Fix | Delete
'toggles' => array(
[52] Fix | Delete
'layout' => et_builder_i18n( 'Layout' ),
[53] Fix | Delete
'text' => array(
[54] Fix | Delete
'title' => et_builder_i18n( 'Text' ),
[55] Fix | Delete
'priority' => 49,
[56] Fix | Delete
),
[57] Fix | Delete
),
[58] Fix | Delete
),
[59] Fix | Delete
'custom_css' => array(
[60] Fix | Delete
'toggles' => array(
[61] Fix | Delete
'privacy' => esc_html__( 'Privacy', 'et_builder' ),
[62] Fix | Delete
),
[63] Fix | Delete
),
[64] Fix | Delete
);
[65] Fix | Delete
[66] Fix | Delete
$this->advanced_fields = array(
[67] Fix | Delete
'fonts' => array(
[68] Fix | Delete
'header' => array(
[69] Fix | Delete
'label' => et_builder_i18n( 'Title' ),
[70] Fix | Delete
'css' => array(
[71] Fix | Delete
'main' => "{$this->main_css_element} .et_pb_newsletter_description h2, {$this->main_css_element} .et_pb_newsletter_description h1.et_pb_module_header, {$this->main_css_element} .et_pb_newsletter_description h3.et_pb_module_header, {$this->main_css_element} .et_pb_newsletter_description h4.et_pb_module_header, {$this->main_css_element} .et_pb_newsletter_description h5.et_pb_module_header, {$this->main_css_element} .et_pb_newsletter_description h6.et_pb_module_header",
[72] Fix | Delete
'important' => 'all',
[73] Fix | Delete
),
[74] Fix | Delete
'header_level' => array(
[75] Fix | Delete
'default' => 'h2',
[76] Fix | Delete
),
[77] Fix | Delete
),
[78] Fix | Delete
'body' => array(
[79] Fix | Delete
'label' => et_builder_i18n( 'Body' ),
[80] Fix | Delete
'css' => array(
[81] Fix | Delete
'main' => "{$this->main_css_element} .et_pb_newsletter_description, {$this->main_css_element} .et_pb_newsletter_form",
[82] Fix | Delete
'line_height' => "{$this->main_css_element} p",
[83] Fix | Delete
),
[84] Fix | Delete
'block_elements' => array(
[85] Fix | Delete
'tabbed_subtoggles' => true,
[86] Fix | Delete
'bb_icons_support' => true,
[87] Fix | Delete
'css' => array(
[88] Fix | Delete
'link' => "{$this->main_css_element} .et_pb_newsletter_description a, {$this->main_css_element} .et_pb_newsletter_form a",
[89] Fix | Delete
'ul' => "{$this->main_css_element} .et_pb_newsletter_description ul li, {$this->main_css_element} .et_pb_newsletter_form ul li",
[90] Fix | Delete
'ul_item_indent' => "{$this->main_css_element} .et_pb_newsletter_description ul, {$this->main_css_element} .et_pb_newsletter_form ul",
[91] Fix | Delete
'ol' => "{$this->main_css_element} .et_pb_newsletter_description ol li, {$this->main_css_element} .et_pb_newsletter_form ol li",
[92] Fix | Delete
'ol_item_indent' => "{$this->main_css_element} .et_pb_newsletter_description ol, {$this->main_css_element} .et_pb_newsletter_form ol",
[93] Fix | Delete
'quote' => "{$this->main_css_element} .et_pb_newsletter_description blockquote, {$this->main_css_element} .et_pb_newsletter_form blockquote",
[94] Fix | Delete
),
[95] Fix | Delete
),
[96] Fix | Delete
),
[97] Fix | Delete
'result_message' => array(
[98] Fix | Delete
'label' => esc_html__( 'Result Message', 'et_builder' ),
[99] Fix | Delete
'css' => array(
[100] Fix | Delete
'main' => "{$this->main_css_element} .et_pb_newsletter_form .et_pb_newsletter_result h2",
[101] Fix | Delete
),
[102] Fix | Delete
),
[103] Fix | Delete
),
[104] Fix | Delete
'margin_padding' => array(
[105] Fix | Delete
'css' => array(
[106] Fix | Delete
'important' => 'all',
[107] Fix | Delete
),
[108] Fix | Delete
),
[109] Fix | Delete
'button' => array(
[110] Fix | Delete
'button' => array(
[111] Fix | Delete
'label' => et_builder_i18n( 'Button' ),
[112] Fix | Delete
'css' => array(
[113] Fix | Delete
'main' => "{$this->main_css_element} .et_pb_newsletter_button.et_pb_button",
[114] Fix | Delete
'limited_main' => "{$this->main_css_element} .et_pb_newsletter_button.et_pb_button",
[115] Fix | Delete
),
[116] Fix | Delete
'box_shadow' => array(
[117] Fix | Delete
'css' => array(
[118] Fix | Delete
'main' => '%%order_class%% .et_pb_newsletter_button',
[119] Fix | Delete
),
[120] Fix | Delete
),
[121] Fix | Delete
'margin_padding' => array(
[122] Fix | Delete
'css' => array(
[123] Fix | Delete
'important' => 'all',
[124] Fix | Delete
),
[125] Fix | Delete
),
[126] Fix | Delete
),
[127] Fix | Delete
),
[128] Fix | Delete
'background' => array(
[129] Fix | Delete
'has_background_color_toggle' => true,
[130] Fix | Delete
'options' => array(
[131] Fix | Delete
'use_background_color' => array(
[132] Fix | Delete
'default' => 'on',
[133] Fix | Delete
),
[134] Fix | Delete
'background_color' => array(
[135] Fix | Delete
'depends_show_if' => 'on',
[136] Fix | Delete
'default' => et_builder_accent_color(),
[137] Fix | Delete
),
[138] Fix | Delete
),
[139] Fix | Delete
),
[140] Fix | Delete
'max_width' => array(),
[141] Fix | Delete
'text' => array(
[142] Fix | Delete
'use_background_layout' => true,
[143] Fix | Delete
'css' => array(
[144] Fix | Delete
'main' => '%%order_class%% .et_pb_newsletter_description p, %%order_class%% .et_pb_newsletter_description .et_pb_module_header',
[145] Fix | Delete
'text_shadow' => '%%order_class%% .et_pb_newsletter_description p, %%order_class%% .et_pb_newsletter_description .et_pb_module_header',
[146] Fix | Delete
),
[147] Fix | Delete
'options' => array(
[148] Fix | Delete
'text_orientation' => array(
[149] Fix | Delete
'default' => 'left',
[150] Fix | Delete
),
[151] Fix | Delete
'background_layout' => array(
[152] Fix | Delete
'default' => 'dark',
[153] Fix | Delete
'hover' => 'tabs',
[154] Fix | Delete
),
[155] Fix | Delete
),
[156] Fix | Delete
),
[157] Fix | Delete
'form_field' => array(
[158] Fix | Delete
'form_field' => array(
[159] Fix | Delete
'label' => esc_html__( 'Fields', 'et_builder' ),
[160] Fix | Delete
'css' => array(
[161] Fix | Delete
'main' => '%%order_class%% .et_pb_newsletter_form p .input',
[162] Fix | Delete
'background_color' => '%%order_class%% .et_pb_newsletter_form p input[type="text"], %%order_class%% .et_pb_newsletter_form p textarea, %%order_class%% .et_pb_newsletter_form p select, %%order_class%% .et_pb_newsletter_form p .input[type="checkbox"] + label i, %%order_class%% .et_pb_newsletter_form p .input[type="radio"] + label i',
[163] Fix | Delete
'background_color_hover' => '%%order_class%% .et_pb_newsletter_form p input[type="text"]:hover, %%order_class%% .et_pb_newsletter_form p textarea:hover, %%order_class%% .et_pb_newsletter_form p select:hover, %%order_class%% .et_pb_newsletter_form p .input[type="checkbox"] + label:hover i, %%order_class%% .et_pb_newsletter_form p .input[type="radio"] + label:hover i',
[164] Fix | Delete
'focus_background_color' => '%%order_class%% .et_pb_newsletter_form p input.input:focus, %%order_class%% .et_pb_newsletter_form p textarea:focus, %%order_class%% .et_pb_newsletter_form p select:focus',
[165] Fix | Delete
'form_text_color' => '%%order_class%% .et_pb_newsletter_form p input[type="text"], %%order_class%% .et_pb_newsletter_form p textarea, %%order_class%% .et_pb_newsletter_form p select, %%order_class%% .et_pb_newsletter_form p .input[type="checkbox"] + label i:before',
[166] Fix | Delete
'form_text_color_hover' => '%%order_class%% .et_pb_newsletter_form p input[type="text"]:hover, %%order_class%% .et_pb_newsletter_form p textarea:hover, %%order_class%% .et_pb_newsletter_form p select:hover, %%order_class%% .et_pb_newsletter_form p .input[type="checkbox"] + label:hover i:before',
[167] Fix | Delete
'focus_text_color' => '%%order_class%% .et_pb_newsletter_form p .input:focus',
[168] Fix | Delete
'placeholder_focus' => '%%order_class%% .et_pb_newsletter_form p .input:focus::-webkit-input-placeholder, %%order_class%% .et_pb_newsletter_form p .input:focus::-moz-placeholder, %%order_class%% .et_pb_newsletter_form p .input:focus:-ms-input-placeholder, %%order_class%% .et_pb_newsletter_form p textarea:focus::-webkit-input-placeholder, %%order_class%% .et_pb_newsletter_form p textarea:focus::-moz-placeholder, %%order_class%% .et_pb_newsletter_form p textarea:focus:-ms-input-placeholder',
[169] Fix | Delete
'important' => array( 'form_text_color' ),
[170] Fix | Delete
),
[171] Fix | Delete
'box_shadow' => array(
[172] Fix | Delete
'name' => 'fields',
[173] Fix | Delete
'css' => array(
[174] Fix | Delete
'main' => '%%order_class%% .et_pb_newsletter_form .input',
[175] Fix | Delete
),
[176] Fix | Delete
'default_on_fronts' => array(
[177] Fix | Delete
'color' => '',
[178] Fix | Delete
'position' => '',
[179] Fix | Delete
),
[180] Fix | Delete
),
[181] Fix | Delete
'border_styles' => array(
[182] Fix | Delete
'form_field' => array(
[183] Fix | Delete
'name' => 'fields',
[184] Fix | Delete
'css' => array(
[185] Fix | Delete
'main' => array(
[186] Fix | Delete
'border_radii' => '%%order_class%% .et_pb_newsletter_form p input[type="text"], %%order_class%% .et_pb_newsletter_form p textarea, %%order_class%% .et_pb_newsletter_form p select, %%order_class%% .et_pb_newsletter_form p .input[type="radio"] + label i, %%order_class%% .et_pb_newsletter_form p .input[type="checkbox"] + label i',
[187] Fix | Delete
'border_styles' => '%%order_class%% .et_pb_newsletter_form p input[type="text"], %%order_class%% .et_pb_newsletter_form p textarea, %%order_class%% .et_pb_newsletter_form p select, %%order_class%% .et_pb_newsletter_form p .input[type="radio"] + label i, %%order_class%% .et_pb_newsletter_form p .input[type="checkbox"] + label i',
[188] Fix | Delete
),
[189] Fix | Delete
),
[190] Fix | Delete
'label_prefix' => esc_html__( 'Fields', 'et_builder' ),
[191] Fix | Delete
),
[192] Fix | Delete
'form_field_focus' => array(
[193] Fix | Delete
'name' => 'fields_focus',
[194] Fix | Delete
'css' => array(
[195] Fix | Delete
'main' => array(
[196] Fix | Delete
'border_radii' => '%%order_class%% .et_pb_newsletter_form p input[type="text"]:focus',
[197] Fix | Delete
'border_styles' => '%%order_class%% .et_pb_newsletter_form p input[type="text"]:focus',
[198] Fix | Delete
),
[199] Fix | Delete
),
[200] Fix | Delete
'label_prefix' => esc_html__( 'Fields Focus', 'et_builder' ),
[201] Fix | Delete
),
[202] Fix | Delete
),
[203] Fix | Delete
'font_field' => array(
[204] Fix | Delete
'css' => array(
[205] Fix | Delete
'main' => array(
[206] Fix | Delete
'%%order_class%%.et_pb_contact_field .et_pb_contact_field_options_title',
[207] Fix | Delete
"{$this->main_css_element} .et_pb_newsletter_form .input",
[208] Fix | Delete
"{$this->main_css_element} .et_pb_newsletter_form .input::-webkit-input-placeholder",
[209] Fix | Delete
"{$this->main_css_element} .et_pb_newsletter_form .input::-moz-placeholder",
[210] Fix | Delete
"{$this->main_css_element} .et_pb_newsletter_form .input:-ms-input-placeholder",
[211] Fix | Delete
"{$this->main_css_element} .et_pb_newsletter_form .input[type=checkbox] + label",
[212] Fix | Delete
"{$this->main_css_element} .et_pb_newsletter_form .input[type=radio] + label",
[213] Fix | Delete
),
[214] Fix | Delete
'hover' => array(
[215] Fix | Delete
'%%order_class%%.et_pb_contact_field .et_pb_contact_field_options_title:hover',
[216] Fix | Delete
"{$this->main_css_element} .et_pb_newsletter_form .input:hover",
[217] Fix | Delete
"{$this->main_css_element} .et_pb_newsletter_form .input:hover::-webkit-input-placeholder",
[218] Fix | Delete
"{$this->main_css_element} .et_pb_newsletter_form .input:hover::-moz-placeholder",
[219] Fix | Delete
"{$this->main_css_element} .et_pb_newsletter_form .input:hover:-ms-input-placeholder",
[220] Fix | Delete
"{$this->main_css_element} .et_pb_newsletter_form .input[type=checkbox] + label:hover",
[221] Fix | Delete
"{$this->main_css_element} .et_pb_newsletter_form .input[type=radio] + label:hover",
[222] Fix | Delete
),
[223] Fix | Delete
'important' => 'plugin_only',
[224] Fix | Delete
),
[225] Fix | Delete
),
[226] Fix | Delete
'margin_padding' => array(
[227] Fix | Delete
'css' => array(
[228] Fix | Delete
'main' => '%%order_class%% .et_pb_newsletter_form p.et_pb_newsletter_field',
[229] Fix | Delete
'padding' => '%%order_class%% .et_pb_newsletter_form .input, %%order_class%% .et_pb_newsletter_form input[type="text"], %%order_class%% .et_pb_newsletter_form p.et_pb_newsletter_field input[type="text"], %%order_class%% .et_pb_newsletter_form textarea, %%order_class%% .et_pb_newsletter_form p.et_pb_newsletter_field textarea, %%order_class%% .et_pb_newsletter_form select',
[230] Fix | Delete
'important' => array( 'custom_padding' ),
[231] Fix | Delete
),
[232] Fix | Delete
),
[233] Fix | Delete
),
[234] Fix | Delete
),
[235] Fix | Delete
);
[236] Fix | Delete
[237] Fix | Delete
$this->custom_css_fields = array(
[238] Fix | Delete
'newsletter_title' => array(
[239] Fix | Delete
'label' => esc_html__( 'Opt-in Title', 'et_builder' ),
[240] Fix | Delete
'selector' => "{$this->main_css_element} .et_pb_newsletter_description h2, {$this->main_css_element} .et_pb_newsletter_description h1.et_pb_module_header, {$this->main_css_element} .et_pb_newsletter_description h3.et_pb_module_header, {$this->main_css_element} .et_pb_newsletter_description h4.et_pb_module_header, {$this->main_css_element} .et_pb_newsletter_description h5.et_pb_module_header, {$this->main_css_element} .et_pb_newsletter_description h6.et_pb_module_header",
[241] Fix | Delete
),
[242] Fix | Delete
'newsletter_description' => array(
[243] Fix | Delete
'label' => esc_html__( 'Opt-in Description', 'et_builder' ),
[244] Fix | Delete
'selector' => '.et_pb_newsletter_description',
[245] Fix | Delete
),
[246] Fix | Delete
'newsletter_form' => array(
[247] Fix | Delete
'label' => esc_html__( 'Opt-in Form', 'et_builder' ),
[248] Fix | Delete
'selector' => '.et_pb_newsletter_form',
[249] Fix | Delete
),
[250] Fix | Delete
'newsletter_fields' => array(
[251] Fix | Delete
'label' => esc_html__( 'Opt-in Form Fields', 'et_builder' ),
[252] Fix | Delete
'selector' => '%%order_class%% .et_pb_newsletter_form p input[type="text"], %%order_class%% .et_pb_newsletter_form p textarea, %%order_class%% .et_pb_newsletter_form p select, %%order_class%% .et_pb_newsletter_form p .input[type="radio"] + label i, %%order_class%% .et_pb_newsletter_form p .input[type="checkbox"] + label i',
[253] Fix | Delete
),
[254] Fix | Delete
'newsletter_button' => array(
[255] Fix | Delete
'label' => esc_html__( 'Subscribe Button', 'et_builder' ),
[256] Fix | Delete
'selector' => '.et_pb_subscribe .et_pb_newsletter_button.et_pb_button',
[257] Fix | Delete
'no_space_before_selector' => true,
[258] Fix | Delete
),
[259] Fix | Delete
);
[260] Fix | Delete
[261] Fix | Delete
$this->help_videos = array(
[262] Fix | Delete
array(
[263] Fix | Delete
'id' => 'kauQ6xheNiw',
[264] Fix | Delete
'name' => esc_html__( 'An introduction to the Email Optin module', 'et_builder' ),
[265] Fix | Delete
),
[266] Fix | Delete
);
[267] Fix | Delete
}
[268] Fix | Delete
[269] Fix | Delete
protected static function _get_account_fields( $provider_slug ) {
[270] Fix | Delete
et_core_nonce_verified_previously();
[271] Fix | Delete
[272] Fix | Delete
$fields = self::providers()->account_fields( $provider_slug );
[273] Fix | Delete
$is_VB = ( et_core_is_fb_enabled() && ! et_fb_dynamic_asset_exists( 'definitions' ) ) || apply_filters( 'et_builder_modules_is_saving_cache', false ) || ( isset( $_REQUEST['action'] ) && in_array( $_REQUEST['action'], array(
[274] Fix | Delete
'et_fb_update_builder_assets',
[275] Fix | Delete
'et_fb_retrieve_builder_data'
[276] Fix | Delete
) ) );
[277] Fix | Delete
$show_if = $is_VB ? 'add_new_account' : 'manage|add_new_account';
[278] Fix | Delete
[279] Fix | Delete
$account_name_key = $provider_slug . '_account_name';
[280] Fix | Delete
$list_key = $provider_slug . '_list';
[281] Fix | Delete
$description_text = esc_html__( 'Email Provider Account Setup Documentation', 'et_builder' );
[282] Fix | Delete
[283] Fix | Delete
if ( $fields ) {
[284] Fix | Delete
$field_ids = array_keys( $fields );
[285] Fix | Delete
$last_field_id = "{$provider_slug}_" . array_pop( $field_ids );
[286] Fix | Delete
} else {
[287] Fix | Delete
$last_field_id = $account_name_key;
[288] Fix | Delete
}
[289] Fix | Delete
[290] Fix | Delete
$buttons = array(
[291] Fix | Delete
'option_class' => 'et-pb-option-group--last-field',
[292] Fix | Delete
'after' => array(
[293] Fix | Delete
array(
[294] Fix | Delete
'type' => 'button',
[295] Fix | Delete
'class' => 'et_pb_email_cancel',
[296] Fix | Delete
'text' => et_builder_i18n( 'Cancel' ),
[297] Fix | Delete
),
[298] Fix | Delete
array(
[299] Fix | Delete
'type' => 'button',
[300] Fix | Delete
'class' => 'et_pb_email_submit',
[301] Fix | Delete
'text' => esc_html__( 'Submit', 'et_builder' ),
[302] Fix | Delete
),
[303] Fix | Delete
),
[304] Fix | Delete
);
[305] Fix | Delete
[306] Fix | Delete
$account_fields = array(
[307] Fix | Delete
$account_name_key => array(
[308] Fix | Delete
'name' => 'account_name',
[309] Fix | Delete
'label' => esc_html__( 'Account Name', 'et_builder' ),
[310] Fix | Delete
'type' => 'text',
[311] Fix | Delete
'option_category' => 'basic_option',
[312] Fix | Delete
'description' => esc_html__( 'A name to associate with the account when displayed in the List select field.', 'et_builder' ),
[313] Fix | Delete
'show_if' => array(
[314] Fix | Delete
$list_key => $show_if,
[315] Fix | Delete
),
[316] Fix | Delete
'class' => "et_pb_email_{$provider_slug}_account_name",
[317] Fix | Delete
'toggle_slug' => 'provider',
[318] Fix | Delete
),
[319] Fix | Delete
);
[320] Fix | Delete
[321] Fix | Delete
foreach ( $fields as $field_id => $field_info ) {
[322] Fix | Delete
$field_id = "{$provider_slug}_{$field_id}";
[323] Fix | Delete
[324] Fix | Delete
$show_if_conditions = array(
[325] Fix | Delete
$list_key => $show_if,
[326] Fix | Delete
);
[327] Fix | Delete
[328] Fix | Delete
if ( isset( $field_info['show_if'] ) ) {
[329] Fix | Delete
$show_if_conditions = array_merge( $show_if_conditions, $field_info['show_if']);
[330] Fix | Delete
}
[331] Fix | Delete
[332] Fix | Delete
$account_fields[ $field_id ] = array(
[333] Fix | Delete
'name' => $field_id,
[334] Fix | Delete
'label' => et_core_esc_previously( $field_info['label'] ),
[335] Fix | Delete
'type' => 'text',
[336] Fix | Delete
'option_category' => 'basic_option',
[337] Fix | Delete
'description' => sprintf( '<a target="_blank" href="https://www.elegantthemes.com/documentation/bloom/accounts#%1$s">%2$s</a>', $provider_slug, $description_text ),
[338] Fix | Delete
'show_if' => $show_if_conditions,
[339] Fix | Delete
'class' => 'et_pb_email_' . $field_id,
[340] Fix | Delete
'toggle_slug' => 'provider',
[341] Fix | Delete
'not_required' => self::$_->array_get( $field_info, 'not_required', false ),
[342] Fix | Delete
);
[343] Fix | Delete
}
[344] Fix | Delete
[345] Fix | Delete
$account_fields[ $last_field_id ] = array_merge( $account_fields[ $last_field_id ], $buttons );
[346] Fix | Delete
[347] Fix | Delete
return $account_fields;
[348] Fix | Delete
}
[349] Fix | Delete
[350] Fix | Delete
protected static function _get_provider_fields() {
[351] Fix | Delete
$fields = array();
[352] Fix | Delete
$lists = self::get_lists();
[353] Fix | Delete
$no_lists = array();
[354] Fix | Delete
[355] Fix | Delete
$no_lists[] = array( 'none' => esc_html__( 'Select a list', 'et_builder' ) );
[356] Fix | Delete
[357] Fix | Delete
$no_lists['manage'] = array(
[358] Fix | Delete
'add_new_account' => '',
[359] Fix | Delete
'remove_account' => '',
[360] Fix | Delete
'fetch_lists' => '',
[361] Fix | Delete
);
[362] Fix | Delete
[363] Fix | Delete
$i18n = array(
[364] Fix | Delete
'label' => esc_html_x( '%s List', 'MailChimp, Aweber, etc', 'et_builder' ),
[365] Fix | Delete
'description' => esc_html__( 'Choose a list. If you don\'t see any lists, click "Add" to add an account.', 'et_builder' ),
[366] Fix | Delete
'add' => esc_html__( 'Add', 'et_builder' ),
[367] Fix | Delete
'remove' => esc_html__( 'Remove', 'et_builder' ),
[368] Fix | Delete
'confirm' => esc_attr__( 'Confirm', 'et_builder' ),
[369] Fix | Delete
'cancel' => esc_attr__( 'Cancel', 'et_builder' ),
[370] Fix | Delete
'fetch' => esc_html__( 'Fetch Lists', 'et_builder' ),
[371] Fix | Delete
'removing' => esc_attr__( 'The following account will be removed:', 'et_builder' ),
[372] Fix | Delete
'adding' => esc_attr__( 'Use the fields below to add a new account.', 'et_builder' ),
[373] Fix | Delete
);
[374] Fix | Delete
[375] Fix | Delete
foreach ( self::$enabled_providers as $provider_slug => $provider_name ) {
[376] Fix | Delete
if ( 'feedburner' === $provider_slug ) {
[377] Fix | Delete
continue;
[378] Fix | Delete
}
[379] Fix | Delete
[380] Fix | Delete
$fields[ $provider_slug . '_list' ] = array(
[381] Fix | Delete
'label' => sprintf( $i18n['label'], $provider_name ),
[382] Fix | Delete
'type' => 'select_with_option_groups',
[383] Fix | Delete
'option_category' => 'basic_option',
[384] Fix | Delete
'options' => isset( $lists[ $provider_slug ] ) ? $lists[ $provider_slug ] : $no_lists,
[385] Fix | Delete
'description' => $i18n['description'],
[386] Fix | Delete
'show_if' => array(
[387] Fix | Delete
'provider' => $provider_slug,
[388] Fix | Delete
),
[389] Fix | Delete
'default' => '0|none',
[390] Fix | Delete
'default_on_front' => '',
[391] Fix | Delete
'toggle_slug' => 'provider',
[392] Fix | Delete
'after' => array(
[393] Fix | Delete
array(
[394] Fix | Delete
'type' => 'button',
[395] Fix | Delete
'class' => 'et_pb_email_add_account',
[396] Fix | Delete
'text' => $i18n['add'],
[397] Fix | Delete
),
[398] Fix | Delete
array(
[399] Fix | Delete
'type' => 'button',
[400] Fix | Delete
'class' => 'et_pb_email_remove_account',
[401] Fix | Delete
'text' => $i18n['remove'],
[402] Fix | Delete
'attributes' => array(
[403] Fix | Delete
'data-confirm_text' => $i18n['confirm'],
[404] Fix | Delete
),
[405] Fix | Delete
),
[406] Fix | Delete
array(
[407] Fix | Delete
'type' => 'button',
[408] Fix | Delete
'class' => 'et_pb_email_force_fetch_lists',
[409] Fix | Delete
'text' => $i18n['fetch'],
[410] Fix | Delete
'attributes' => array(
[411] Fix | Delete
'data-cancel_text' => $i18n['cancel'],
[412] Fix | Delete
),
[413] Fix | Delete
),
[414] Fix | Delete
),
[415] Fix | Delete
'attributes' => array(
[416] Fix | Delete
'data-confirm_remove_text' => $i18n['removing'],
[417] Fix | Delete
'data-adding_new_account_text' => $i18n['adding'],
[418] Fix | Delete
),
[419] Fix | Delete
);
[420] Fix | Delete
[421] Fix | Delete
$account_fields = is_admin() || et_core_is_saving_builder_modules_cache() || ( et_core_is_fb_enabled() && ! et_fb_dynamic_asset_exists( 'definitions' ) ) ? self::_get_account_fields( $provider_slug ) : array();
[422] Fix | Delete
$fields = array_merge( $fields, $account_fields );
[423] Fix | Delete
}
[424] Fix | Delete
[425] Fix | Delete
return $fields;
[426] Fix | Delete
}
[427] Fix | Delete
[428] Fix | Delete
function get_fields() {
[429] Fix | Delete
$name_field_only = array_keys( self::providers()->names_by_slug( 'all', 'name_field_only' ) );
[430] Fix | Delete
$no_custom_fields = array_keys( self::providers()->names_by_slug( 'all', 'no_custom_fields' ) );
[431] Fix | Delete
[432] Fix | Delete
return array_merge(
[433] Fix | Delete
array(
[434] Fix | Delete
'provider' => array(
[435] Fix | Delete
'label' => esc_html__( 'Service Provider', 'et_builder' ),
[436] Fix | Delete
'type' => 'select',
[437] Fix | Delete
'option_category' => 'basic_option',
[438] Fix | Delete
'options' => self::$enabled_providers,
[439] Fix | Delete
'description' => esc_html__( 'Choose a service provider.', 'et_builder' ),
[440] Fix | Delete
'toggle_slug' => 'provider',
[441] Fix | Delete
'default' => 'mailchimp',
[442] Fix | Delete
),
[443] Fix | Delete
'feedburner_uri' => array(
[444] Fix | Delete
'label' => esc_html__( 'Feed Title', 'et_builder' ),
[445] Fix | Delete
'type' => 'text',
[446] Fix | Delete
'option_category' => 'basic_option',
[447] Fix | Delete
'show_if' => array(
[448] Fix | Delete
'provider' => 'feedburner',
[449] Fix | Delete
),
[450] Fix | Delete
'description' => et_get_safe_localization( sprintf( __( 'Enter <a href="%1$s" target="_blank">Feed Title</a>.', 'et_builder' ), esc_url( 'http://feedburner.google.com/fb/a/myfeeds' ) ) ),
[451] Fix | Delete
'toggle_slug' => 'provider',
[452] Fix | Delete
),
[453] Fix | Delete
),
[454] Fix | Delete
[455] Fix | Delete
self::_get_provider_fields(),
[456] Fix | Delete
[457] Fix | Delete
array(
[458] Fix | Delete
'layout' => array(
[459] Fix | Delete
'label' => et_builder_i18n( 'Layout' ),
[460] Fix | Delete
'description' => esc_html__( 'Choose where you would like the input fields to appear in relation to the body text and title text.', 'et_builder' ),
[461] Fix | Delete
'type' => 'select',
[462] Fix | Delete
'options' => array(
[463] Fix | Delete
'left_right' => esc_html__( 'Body On Left, Form On Right', 'et_builder' ),
[464] Fix | Delete
'right_left' => esc_html__( 'Body On Right, Form On Left', 'et_builder' ),
[465] Fix | Delete
'top_bottom' => esc_html__( 'Body On Top, Form On Bottom', 'et_builder' ),
[466] Fix | Delete
'bottom_top' => esc_html__( 'Body On Bottom, Form On Top', 'et_builder' ),
[467] Fix | Delete
),
[468] Fix | Delete
'default' => 'left_right',
[469] Fix | Delete
'tab_slug' => 'advanced',
[470] Fix | Delete
'toggle_slug' => 'layout',
[471] Fix | Delete
),
[472] Fix | Delete
'ip_address' => array(
[473] Fix | Delete
'label' => esc_html__( 'Include IP Address' ),
[474] Fix | Delete
'type' => 'yes_no_button',
[475] Fix | Delete
'options' => array(
[476] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[477] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[478] Fix | Delete
),
[479] Fix | Delete
'default' => 'on',
[480] Fix | Delete
'option_category' => 'configuration',
[481] Fix | Delete
'description' => esc_html__( "Include the subscriber's ip address in the data sent to your email provider.", 'et_builder' ),
[482] Fix | Delete
'toggle_slug' => 'privacy',
[483] Fix | Delete
'tab_slug' => 'custom_css',
[484] Fix | Delete
),
[485] Fix | Delete
'name_field' => array(
[486] Fix | Delete
'label' => esc_html__( 'Use Single Name Field', 'et_builder' ),
[487] Fix | Delete
'type' => 'yes_no_button',
[488] Fix | Delete
'option_category' => 'configuration',
[489] Fix | Delete
'options' => array(
[490] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[491] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[492] Fix | Delete
),
[493] Fix | Delete
'default' => 'off',
[494] Fix | Delete
'show_if_not' => array(
[495] Fix | Delete
'provider' => array_merge( $name_field_only, array( 'feedburner' ) ),
[496] Fix | Delete
),
[497] Fix | Delete
'toggle_slug' => 'fields',
[498] Fix | Delete
'description' => esc_html__( 'Whether or not to use a single Name field in the opt-in form.', 'et_builder' ),
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function