Edit File by line
/home/barbar84/www/wp-conte.../themes/Divi/includes/builder/module
File: SignupItem.php
<?php
[0] Fix | Delete
[1] Fix | Delete
class ET_Builder_Module_Signup_Item extends ET_Builder_Module {
[2] Fix | Delete
[3] Fix | Delete
public $child_title_var = 'field_title';
[4] Fix | Delete
public $bb_support = false;
[5] Fix | Delete
public $main_css_element = '.et_pb_newsletter_form %%order_class%%';
[6] Fix | Delete
public $no_render = true;
[7] Fix | Delete
public $slug = 'et_pb_signup_custom_field';
[8] Fix | Delete
public $type = 'child';
[9] Fix | Delete
public $vb_support = 'on';
[10] Fix | Delete
[11] Fix | Delete
public function init() {
[12] Fix | Delete
$this->name = esc_html__( 'Custom Field', 'et_builder' );
[13] Fix | Delete
$this->plural = esc_html__( 'Custom Fields', 'et_builder' );
[14] Fix | Delete
$this->advanced_setting_title_text = $this->name;
[15] Fix | Delete
$this->settings_text = esc_html__( 'Custom Field Settings', 'et_builder' );
[16] Fix | Delete
}
[17] Fix | Delete
[18] Fix | Delete
public function get_advanced_fields_config() {
[19] Fix | Delete
return array(
[20] Fix | Delete
'background' => array(
[21] Fix | Delete
'css' => array(
[22] Fix | Delete
'main' => '%%order_class%%',
[23] Fix | Delete
),
[24] Fix | Delete
),
[25] Fix | Delete
'borders' => array(
[26] Fix | Delete
'default' => array(
[27] Fix | Delete
'css' => array(
[28] Fix | Delete
'main' => array(
[29] Fix | Delete
'border_radii' => sprintf( '%1$s .input, %1$s .input[type="checkbox"] + label i, %1$s .input[type="radio"] + label i', '.et_pb_newsletter_form .et_pb_newsletter_fields p%%order_class%%' ),
[30] Fix | Delete
'border_styles' => sprintf( '%1$s .input, %1$s .input[type="checkbox"] + label i, %1$s .input[type="radio"] + label i', '.et_pb_newsletter_form .et_pb_newsletter_fields p%%order_class%%' ),
[31] Fix | Delete
),
[32] Fix | Delete
'important' => 'plugin_only',
[33] Fix | Delete
),
[34] Fix | Delete
'label_prefix' => esc_html__( 'Input', 'et_builder' ),
[35] Fix | Delete
'defaults' => array(
[36] Fix | Delete
'border_radii' => 'on|3px|3px|3px|3px',
[37] Fix | Delete
'border_styles' => array(
[38] Fix | Delete
'width' => '0px',
[39] Fix | Delete
'color' => '#333333',
[40] Fix | Delete
'style' => 'solid',
[41] Fix | Delete
),
[42] Fix | Delete
),
[43] Fix | Delete
'fields_after' => array(
[44] Fix | Delete
'use_focus_border_color' => array(
[45] Fix | Delete
'label' => esc_html__( 'Use Focus Borders', 'et_builder' ),
[46] Fix | Delete
'description' => esc_html__( 'Enabling this option will add borders to input fields when focused.', 'et_builder' ),
[47] Fix | Delete
'type' => 'yes_no_button',
[48] Fix | Delete
'option_category' => 'color_option',
[49] Fix | Delete
'options' => array(
[50] Fix | Delete
'off' => et_builder_i18n( 'No' ),
[51] Fix | Delete
'on' => et_builder_i18n( 'Yes' ),
[52] Fix | Delete
),
[53] Fix | Delete
'affects' => array(
[54] Fix | Delete
'border_radii_focus',
[55] Fix | Delete
'border_styles_focus',
[56] Fix | Delete
),
[57] Fix | Delete
'tab_slug' => 'advanced',
[58] Fix | Delete
'toggle_slug' => 'border',
[59] Fix | Delete
'default_on_front' => 'off',
[60] Fix | Delete
),
[61] Fix | Delete
),
[62] Fix | Delete
),
[63] Fix | Delete
'focus' => array(
[64] Fix | Delete
'label_prefix' => esc_html__( 'Input Focus', 'et_builder' ),
[65] Fix | Delete
'css' => array(
[66] Fix | Delete
'main' => array(
[67] Fix | Delete
'border_radii' => sprintf( '%1$s .input:focus, %1$s .input[type="checkbox"]:focus + label i, %1$s .input[type="radio"]:focus + label i', '.et_pb_newsletter_form .et_pb_newsletter_fields p%%order_class%%' ),
[68] Fix | Delete
'border_styles' => sprintf( '%1$s .input:focus, %1$s .input[type="checkbox"]:focus + label i, %1$s .input[type="radio"]:focus + label i', '.et_pb_newsletter_form .et_pb_newsletter_fields p%%order_class%%' ),
[69] Fix | Delete
),
[70] Fix | Delete
'important' => 'plugin_only',
[71] Fix | Delete
),
[72] Fix | Delete
'option_category' => 'border',
[73] Fix | Delete
'tab_slug' => 'advanced',
[74] Fix | Delete
'toggle_slug' => 'border',
[75] Fix | Delete
'depends_on' => array( 'use_focus_border_color' ),
[76] Fix | Delete
'depends_show_if' => 'on',
[77] Fix | Delete
'defaults' => array(
[78] Fix | Delete
'border_radii' => 'on|3px|3px|3px|3px',
[79] Fix | Delete
'border_styles' => array(
[80] Fix | Delete
'width' => '0px',
[81] Fix | Delete
'color' => '#333333',
[82] Fix | Delete
'style' => 'solid',
[83] Fix | Delete
),
[84] Fix | Delete
),
[85] Fix | Delete
),
[86] Fix | Delete
),
[87] Fix | Delete
'box_shadow' => array(
[88] Fix | Delete
'default' => array(
[89] Fix | Delete
'css' => array(
[90] Fix | Delete
'main' => implode(
[91] Fix | Delete
', ',
[92] Fix | Delete
array(
[93] Fix | Delete
'%%order_class%% input',
[94] Fix | Delete
'%%order_class%% select',
[95] Fix | Delete
'%%order_class%% textarea',
[96] Fix | Delete
'%%order_class%% .et_pb_contact_field_options_list label > i',
[97] Fix | Delete
)
[98] Fix | Delete
),
[99] Fix | Delete
'important' => true,
[100] Fix | Delete
),
[101] Fix | Delete
),
[102] Fix | Delete
),
[103] Fix | Delete
'filters' => array(
[104] Fix | Delete
'css' => array(
[105] Fix | Delete
'main' => array(
[106] Fix | Delete
'%%order_class%% input',
[107] Fix | Delete
'%%order_class%% textarea',
[108] Fix | Delete
'%%order_class%% label',
[109] Fix | Delete
),
[110] Fix | Delete
),
[111] Fix | Delete
),
[112] Fix | Delete
'margin_padding' => array(
[113] Fix | Delete
'css' => array(
[114] Fix | Delete
'main' => '.et_pb_newsletter_form p%%order_class%%',
[115] Fix | Delete
'padding' => '.et_pb_newsletter_form p%%order_class%%.et_pb_newsletter_field.et_pb_signup_custom_field',
[116] Fix | Delete
'important' => array( 'custom_margin' ), // needed to overwrite last module margin-bottom styling
[117] Fix | Delete
),
[118] Fix | Delete
),
[119] Fix | Delete
'text' => array(
[120] Fix | Delete
'css' => array(
[121] Fix | Delete
'text_orientation' => '%%order_class%% input, %%order_class%% textarea, %%order_class%% label',
[122] Fix | Delete
),
[123] Fix | Delete
),
[124] Fix | Delete
'text_shadow' => array(
[125] Fix | Delete
// Don't add text-shadow fields since they already are via font-options
[126] Fix | Delete
'default' => false,
[127] Fix | Delete
),
[128] Fix | Delete
'form_field' => array(
[129] Fix | Delete
'form_field' => array(
[130] Fix | Delete
'label' => esc_html__( 'Field', 'et_builder' ),
[131] Fix | Delete
'css' => array(
[132] Fix | Delete
'main' => '.et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% .input',
[133] Fix | Delete
'background_color' => '.et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% input[type="text"], .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% textarea, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% select, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% .input[type="checkbox"] + label i, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% .input[type="radio"] + label i',
[134] Fix | Delete
'background_color_hover' => '.et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% input[type="text"]:hover, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% textarea:hover, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% select:hover, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% .input[type="checkbox"] + label:hover i, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% .input[type="radio"] + label:hover i',
[135] Fix | Delete
'focus_background_color' => '.et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% input.input:focus, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% textarea:focus, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% select:focus',
[136] Fix | Delete
'form_text_color' => '.et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% input[type="text"], .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% textarea, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% select, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% .input[type="checkbox"] + label i:before',
[137] Fix | Delete
'form_text_color_hover' => '.et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% input[type="text"]:hover, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% textarea:hover, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% select:hover, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% .input[type="checkbox"] + label:hover i:before',
[138] Fix | Delete
'focus_text_color' => '.et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% .input:focus',
[139] Fix | Delete
'placeholder_focus' => '.et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% .input:focus::-webkit-input-placeholder, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% .input:focus::-moz-placeholder, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% .input:focus:-ms-input-placeholder, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% textarea:focus::-webkit-input-placeholder, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% textarea:focus::-moz-placeholder, .et_pb_newsletter_form .et_pb_newsletter_fields %%order_class%% textarea:focus:-ms-input-placeholder',
[140] Fix | Delete
'important' => array( 'form_text_color', 'padding', 'margin' ),
[141] Fix | Delete
),
[142] Fix | Delete
'margin_padding' => false,
[143] Fix | Delete
'box_shadow' => false,
[144] Fix | Delete
'border_styles' => false,
[145] Fix | Delete
'font_field' => array(
[146] Fix | Delete
'css' => array(
[147] Fix | Delete
'main' => array(
[148] Fix | Delete
'%%order_class%%.et_pb_contact_field .et_pb_contact_field_options_title',
[149] Fix | Delete
'.et_pb_newsletter_form .et_pb_newsletter_fields p%%order_class%% .input',
[150] Fix | Delete
'.et_pb_newsletter_form .et_pb_newsletter_fields p%%order_class%% .input::-webkit-input-placeholder',
[151] Fix | Delete
'.et_pb_newsletter_form .et_pb_newsletter_fields p%%order_class%% .input::-moz-placeholder',
[152] Fix | Delete
'.et_pb_newsletter_form .et_pb_newsletter_fields p%%order_class%% .input:-ms-input-placeholder',
[153] Fix | Delete
'.et_pb_newsletter_form .et_pb_newsletter_fields p%%order_class%% .input[type=checkbox] + label',
[154] Fix | Delete
'.et_pb_newsletter_form .et_pb_newsletter_fields p%%order_class%% .input[type=radio] + label',
[155] Fix | Delete
),
[156] Fix | Delete
'hover' => array(
[157] Fix | Delete
'%%order_class%%.et_pb_contact_field .et_pb_contact_field_options_title:hover',
[158] Fix | Delete
'.et_pb_newsletter_form .et_pb_newsletter_fields p%%order_class%% .input:hover',
[159] Fix | Delete
'.et_pb_newsletter_form .et_pb_newsletter_fields p%%order_class%% .input:hover::-webkit-input-placeholder',
[160] Fix | Delete
'.et_pb_newsletter_form .et_pb_newsletter_fields p%%order_class%% .input:hover::-moz-placeholder',
[161] Fix | Delete
'.et_pb_newsletter_form .et_pb_newsletter_fields p%%order_class%% .input:hover:-ms-input-placeholder',
[162] Fix | Delete
'.et_pb_newsletter_form .et_pb_newsletter_fields p%%order_class%% .input[type=checkbox] + label:hover',
[163] Fix | Delete
'.et_pb_newsletter_form .et_pb_newsletter_fields p%%order_class%% .input[type=radio] + label:hover',
[164] Fix | Delete
),
[165] Fix | Delete
'important' => 'plugin_only',
[166] Fix | Delete
),
[167] Fix | Delete
),
[168] Fix | Delete
),
[169] Fix | Delete
),
[170] Fix | Delete
'sticky' => false,
[171] Fix | Delete
);
[172] Fix | Delete
}
[173] Fix | Delete
[174] Fix | Delete
public function get_fields() {
[175] Fix | Delete
$fields = ET_Core_API_Email_Fields::get_definitions( 'builder' );
[176] Fix | Delete
[177] Fix | Delete
// Remove field background color because we already have one that support responsive settings
[178] Fix | Delete
// on Form Field element.
[179] Fix | Delete
if ( isset( $fields['field_background_color'] ) ) {
[180] Fix | Delete
unset( $fields['field_background_color'] );
[181] Fix | Delete
}
[182] Fix | Delete
[183] Fix | Delete
return $fields;
[184] Fix | Delete
}
[185] Fix | Delete
[186] Fix | Delete
public function get_settings_modal_toggles() {
[187] Fix | Delete
return array(
[188] Fix | Delete
'general' => array(
[189] Fix | Delete
'toggles' => array(
[190] Fix | Delete
'main_content' => esc_html__( 'Field', 'et_builder' ),
[191] Fix | Delete
'field_options' => esc_html__( 'Field Options', 'et_builder' ),
[192] Fix | Delete
'conditional_logic' => esc_html__( 'Conditional Logic', 'et_builder' ),
[193] Fix | Delete
'background' => et_builder_i18n( 'Background' ),
[194] Fix | Delete
),
[195] Fix | Delete
),
[196] Fix | Delete
'advanced' => array(
[197] Fix | Delete
'toggles' => array(
[198] Fix | Delete
'layout' => et_builder_i18n( 'Layout' ),
[199] Fix | Delete
),
[200] Fix | Delete
),
[201] Fix | Delete
);
[202] Fix | Delete
}
[203] Fix | Delete
}
[204] Fix | Delete
[205] Fix | Delete
new ET_Builder_Module_Signup_Item();
[206] Fix | Delete
[207] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function