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/wp-conte.../themes/Divi/core/componen.../api/email
File: Fields.php
<?php
[0] Fix | Delete
[1] Fix | Delete
[2] Fix | Delete
class ET_Core_API_Email_Fields {
[3] Fix | Delete
[4] Fix | Delete
/**
[5] Fix | Delete
* @var ET_Core_Data_Utils
[6] Fix | Delete
*/
[7] Fix | Delete
protected static $_;
[8] Fix | Delete
[9] Fix | Delete
protected static $_any_custom_field_type_support;
[10] Fix | Delete
protected static $_predefined_custom_field_support;
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* @var ET_Core_API_Email_Providers
[14] Fix | Delete
*/
[15] Fix | Delete
protected static $_providers;
[16] Fix | Delete
[17] Fix | Delete
public static $owner;
[18] Fix | Delete
[19] Fix | Delete
protected static function _custom_field_definitions() {
[20] Fix | Delete
$readonly_dependency = 'builder' === self::$owner ? 'parentModule:provider' : 'email_provider';
[21] Fix | Delete
$custom_fields_support = array_keys( self::$_providers->names_by_slug( 'all', 'custom_fields' ) );
[22] Fix | Delete
$custom_fields_data = self::$_providers->custom_fields_data();
[23] Fix | Delete
$fields = array();
[24] Fix | Delete
[25] Fix | Delete
if ( 'bloom' === self::$owner ) {
[26] Fix | Delete
$fields = array(
[27] Fix | Delete
'use_custom_fields' => array(
[28] Fix | Delete
'label' => esc_html__( 'Use Custom Fields', 'et_core' ),
[29] Fix | Delete
'type' => 'yes_no_button',
[30] Fix | Delete
'options' => array(
[31] Fix | Delete
'on' => esc_html__( 'Yes', 'et_core' ),
[32] Fix | Delete
'off' => esc_html__( 'No', 'et_core' ),
[33] Fix | Delete
),
[34] Fix | Delete
'default' => 'off',
[35] Fix | Delete
'show_if' => array(
[36] Fix | Delete
'email_provider' => $custom_fields_support,
[37] Fix | Delete
),
[38] Fix | Delete
'allow_dynamic' => array_keys( self::$_providers->names_by_slug( 'all', 'dynamic_custom_fields' ) ),
[39] Fix | Delete
'description' => esc_html__( 'Enable this option to use custom fields in your opt-in form.', 'et_core' ),
[40] Fix | Delete
),
[41] Fix | Delete
'custom_fields' => array(
[42] Fix | Delete
'type' => 'sortable_list',
[43] Fix | Delete
'label' => '',
[44] Fix | Delete
'default' => '[]',
[45] Fix | Delete
),
[46] Fix | Delete
'editing_field' => array(
[47] Fix | Delete
'type' => 'skip',
[48] Fix | Delete
'default' => 'off',
[49] Fix | Delete
),
[50] Fix | Delete
);
[51] Fix | Delete
}
[52] Fix | Delete
[53] Fix | Delete
foreach ( $custom_fields_data as $provider => $accounts ) {
[54] Fix | Delete
foreach ( $accounts as $account => $lists ) {
[55] Fix | Delete
$account_name = str_replace( ' ', '', strtolower( $account ) );
[56] Fix | Delete
$key = "predefined_field_{$provider}_{$account_name}";
[57] Fix | Delete
[58] Fix | Delete
if ( isset( $lists['custom_fields'] ) ) {
[59] Fix | Delete
// Custom fields are per account
[60] Fix | Delete
$fields[ $key ] = self::_predefined_custom_field_select( $lists['custom_fields'], $provider, $account );
[61] Fix | Delete
continue;
[62] Fix | Delete
}
[63] Fix | Delete
[64] Fix | Delete
foreach ( $lists as $list_id => $custom_fields ) {
[65] Fix | Delete
// Custom fields are per list
[66] Fix | Delete
$key = "predefined_field_{$provider}_{$account_name}_{$list_id}";
[67] Fix | Delete
$fields[ $key ] = self::_predefined_custom_field_select( $custom_fields, $provider, $account, $list_id );
[68] Fix | Delete
}
[69] Fix | Delete
}
[70] Fix | Delete
}
[71] Fix | Delete
[72] Fix | Delete
$labels = array(
[73] Fix | Delete
'link_url' => esc_html__( 'Link URL', 'et_core' ),
[74] Fix | Delete
'link_text' => esc_html__( 'Link Text', 'et_core' ),
[75] Fix | Delete
'link_cancel' => esc_html__( 'Discard Changes', 'et_core' ),
[76] Fix | Delete
'link_save' => esc_html__( 'Save Changes', 'et_core' ),
[77] Fix | Delete
'link_settings' => esc_html__( 'Option Link', 'et_core' ),
[78] Fix | Delete
);
[79] Fix | Delete
[80] Fix | Delete
$fields = array_merge( $fields, array(
[81] Fix | Delete
'predefined_field' => array(
[82] Fix | Delete
'type' => 'skip',
[83] Fix | Delete
'default' => 'none',
[84] Fix | Delete
),
[85] Fix | Delete
'field_id' => array(
[86] Fix | Delete
'label' => esc_html__( 'ID', 'et_core' ),
[87] Fix | Delete
'type' => 'text',
[88] Fix | Delete
'default' => '', // <--- Intentional
[89] Fix | Delete
'description' => esc_html__( 'Define a unique ID for this field. You should use only English characters without special characters or spaces.', 'et_core' ),
[90] Fix | Delete
'toggle_slug' => 'main_content',
[91] Fix | Delete
'readonly_if' => array(
[92] Fix | Delete
$readonly_dependency => self::$_predefined_custom_field_support,
[93] Fix | Delete
),
[94] Fix | Delete
),
[95] Fix | Delete
'field_title' => array(
[96] Fix | Delete
'label' => esc_html__( 'Name', 'et_core' ),
[97] Fix | Delete
'type' => 'text',
[98] Fix | Delete
'description' => esc_html__( 'Set the label that will appear above this field in the opt-in form.', 'et_core' ),
[99] Fix | Delete
'toggle_slug' => 'main_content',
[100] Fix | Delete
'readonly_if' => array(
[101] Fix | Delete
$readonly_dependency => self::$_predefined_custom_field_support,
[102] Fix | Delete
),
[103] Fix | Delete
'readonly_if_not' => array(
[104] Fix | Delete
$readonly_dependency => array( 'getresponse', 'sendinblue', 'constant_contact' ),
[105] Fix | Delete
),
[106] Fix | Delete
),
[107] Fix | Delete
'field_type' => array(
[108] Fix | Delete
'label' => esc_html__( 'Type', 'et_core' ),
[109] Fix | Delete
'type' => 'select',
[110] Fix | Delete
'default' => 'none',
[111] Fix | Delete
'option_category' => 'basic_option',
[112] Fix | Delete
'options' => array(
[113] Fix | Delete
'none' => esc_html__( 'Choose a field type...', 'et_core' ),
[114] Fix | Delete
'input' => esc_html__( 'Input Field', 'et_core' ),
[115] Fix | Delete
'email' => esc_html__( 'Email Field', 'et_core' ),
[116] Fix | Delete
'text' => esc_html__( 'Textarea', 'et_core' ),
[117] Fix | Delete
'checkbox' => esc_html__( 'Checkboxes', 'et_core' ),
[118] Fix | Delete
'radio' => esc_html__( 'Radio Buttons', 'et_core' ),
[119] Fix | Delete
'select' => esc_html__( 'Select Dropdown', 'et_core' ),
[120] Fix | Delete
),
[121] Fix | Delete
'description' => esc_html__( 'Choose the type of field', 'et_core' ),
[122] Fix | Delete
'toggle_slug' => 'field_options',
[123] Fix | Delete
'readonly_if' => array(
[124] Fix | Delete
$readonly_dependency => self::$_predefined_custom_field_support,
[125] Fix | Delete
),
[126] Fix | Delete
'readonly_if_not' => array(
[127] Fix | Delete
$readonly_dependency => self::$_any_custom_field_type_support,
[128] Fix | Delete
),
[129] Fix | Delete
),
[130] Fix | Delete
'checkbox_checked' => array(
[131] Fix | Delete
'label' => esc_html__( 'Checked By Default', 'et_core' ),
[132] Fix | Delete
'description' => esc_html__( 'If enabled, the check mark will be automatically selected for the visitor. They can still deselect it.', 'et_core' ),
[133] Fix | Delete
'type' => 'hidden',
[134] Fix | Delete
'option_category' => 'layout',
[135] Fix | Delete
'default' => 'off',
[136] Fix | Delete
'toggle_slug' => 'field_options',
[137] Fix | Delete
'show_if' => array(
[138] Fix | Delete
'field_type' => 'checkbox',
[139] Fix | Delete
),
[140] Fix | Delete
),
[141] Fix | Delete
'checkbox_options' => array(
[142] Fix | Delete
'label' => esc_html__( 'Options', 'et_core' ),
[143] Fix | Delete
'type' => 'sortable_list',
[144] Fix | Delete
'checkbox' => true,
[145] Fix | Delete
'option_category' => 'basic_option',
[146] Fix | Delete
'toggle_slug' => 'field_options',
[147] Fix | Delete
'readonly_if' => array(
[148] Fix | Delete
$readonly_dependency => self::$_predefined_custom_field_support,
[149] Fix | Delete
),
[150] Fix | Delete
'readonly_if_not' => array(
[151] Fix | Delete
$readonly_dependency => self::$_any_custom_field_type_support,
[152] Fix | Delete
),
[153] Fix | Delete
'show_if' => array(
[154] Fix | Delete
'field_type' => 'checkbox',
[155] Fix | Delete
),
[156] Fix | Delete
'right_actions' => 'move|link|copy|delete',
[157] Fix | Delete
'right_actions_readonly' => 'move|link',
[158] Fix | Delete
'labels' => $labels,
[159] Fix | Delete
),
[160] Fix | Delete
'radio_options' => array(
[161] Fix | Delete
'label' => esc_html__( 'Options', 'et_core' ),
[162] Fix | Delete
'type' => 'sortable_list',
[163] Fix | Delete
'radio' => true,
[164] Fix | Delete
'option_category' => 'basic_option',
[165] Fix | Delete
'toggle_slug' => 'field_options',
[166] Fix | Delete
'readonly_if' => array(
[167] Fix | Delete
$readonly_dependency => self::$_predefined_custom_field_support,
[168] Fix | Delete
),
[169] Fix | Delete
'readonly_if_not' => array(
[170] Fix | Delete
$readonly_dependency => self::$_any_custom_field_type_support,
[171] Fix | Delete
),
[172] Fix | Delete
'show_if' => array(
[173] Fix | Delete
'field_type' => 'radio',
[174] Fix | Delete
),
[175] Fix | Delete
'right_actions' => 'move|link|copy|delete',
[176] Fix | Delete
'right_actions_readonly' => 'move|link',
[177] Fix | Delete
'labels' => $labels,
[178] Fix | Delete
),
[179] Fix | Delete
'select_options' => array(
[180] Fix | Delete
'label' => esc_html__( 'Options', 'et_core' ),
[181] Fix | Delete
'type' => 'sortable_list',
[182] Fix | Delete
'option_category' => 'basic_option',
[183] Fix | Delete
'toggle_slug' => 'field_options',
[184] Fix | Delete
'readonly_if' => array(
[185] Fix | Delete
$readonly_dependency => self::$_predefined_custom_field_support,
[186] Fix | Delete
),
[187] Fix | Delete
'readonly_if_not' => array(
[188] Fix | Delete
$readonly_dependency => self::$_any_custom_field_type_support,
[189] Fix | Delete
),
[190] Fix | Delete
'show_if' => array(
[191] Fix | Delete
'field_type' => 'select',
[192] Fix | Delete
),
[193] Fix | Delete
'right_actions' => 'move|copy|delete',
[194] Fix | Delete
'right_actions_readonly' => 'move',
[195] Fix | Delete
),
[196] Fix | Delete
'min_length' => array(
[197] Fix | Delete
'label' => esc_html__( 'Minimum Length', 'et_core' ),
[198] Fix | Delete
'description' => esc_html__( 'Leave at 0 to remove restriction', 'et_core' ),
[199] Fix | Delete
'type' => 'range',
[200] Fix | Delete
'default' => '0',
[201] Fix | Delete
'unitless' => true,
[202] Fix | Delete
'range_settings' => array(
[203] Fix | Delete
'min' => '0',
[204] Fix | Delete
'max' => '255',
[205] Fix | Delete
'step' => '1',
[206] Fix | Delete
),
[207] Fix | Delete
'option_category' => 'basic_option',
[208] Fix | Delete
'toggle_slug' => 'field_options',
[209] Fix | Delete
'show_if' => array(
[210] Fix | Delete
'field_type' => 'input',
[211] Fix | Delete
),
[212] Fix | Delete
),
[213] Fix | Delete
'max_length' => array(
[214] Fix | Delete
'label' => esc_html__( 'Maximum Length', 'et_core' ),
[215] Fix | Delete
'description' => esc_html__( 'Leave at 0 to remove restriction', 'et_core' ),
[216] Fix | Delete
'type' => 'range',
[217] Fix | Delete
'default' => '0',
[218] Fix | Delete
'unitless' => true,
[219] Fix | Delete
'range_settings' => array(
[220] Fix | Delete
'min' => '0',
[221] Fix | Delete
'max' => '255',
[222] Fix | Delete
'step' => '1',
[223] Fix | Delete
),
[224] Fix | Delete
'option_category' => 'basic_option',
[225] Fix | Delete
'toggle_slug' => 'field_options',
[226] Fix | Delete
'show_if' => array(
[227] Fix | Delete
'field_type' => 'input',
[228] Fix | Delete
),
[229] Fix | Delete
),
[230] Fix | Delete
'allowed_symbols' => array(
[231] Fix | Delete
'label' => esc_html__( 'Allowed Symbols', 'et_core' ),
[232] Fix | Delete
'description' => esc_html__( 'You can validate certain types of information by disallowing certain symbols. Symbols added here will prevent the form from being submitted if added by the user.', 'et_core' ),
[233] Fix | Delete
'type' => 'select',
[234] Fix | Delete
'default' => 'all',
[235] Fix | Delete
'options' => array(
[236] Fix | Delete
'all' => esc_html__( 'All', 'et_core' ),
[237] Fix | Delete
'letters' => esc_html__( 'Letters Only (A-Z)', 'et_core' ),
[238] Fix | Delete
'numbers' => esc_html__( 'Numbers Only (0-9)', 'et_core' ),
[239] Fix | Delete
'alphanumeric' => esc_html__( 'Alphanumeric Only (A-Z, 0-9)', 'et_core' ),
[240] Fix | Delete
),
[241] Fix | Delete
'option_category' => 'basic_option',
[242] Fix | Delete
'toggle_slug' => 'field_options',
[243] Fix | Delete
'show_if' => array(
[244] Fix | Delete
'field_type' => 'input',
[245] Fix | Delete
),
[246] Fix | Delete
),
[247] Fix | Delete
'required_mark' => array(
[248] Fix | Delete
'label' => esc_html__( 'Required Field', 'et_core' ),
[249] Fix | Delete
'type' => 'yes_no_button',
[250] Fix | Delete
'option_category' => 'configuration',
[251] Fix | Delete
'default' => 'on',
[252] Fix | Delete
'options' => array(
[253] Fix | Delete
'on' => esc_html__( 'Yes', 'et_core' ),
[254] Fix | Delete
'off' => esc_html__( 'No', 'et_core' ),
[255] Fix | Delete
),
[256] Fix | Delete
'description' => esc_html__( 'Define whether the field should be required or optional', 'et_core' ),
[257] Fix | Delete
'toggle_slug' => 'field_options',
[258] Fix | Delete
),
[259] Fix | Delete
'hidden' => array(
[260] Fix | Delete
'label' => esc_html__( 'Hidden Field', 'et_core' ),
[261] Fix | Delete
'type' => 'yes_no_button',
[262] Fix | Delete
'option_category' => 'configuration',
[263] Fix | Delete
'default' => 'off',
[264] Fix | Delete
'options' => array(
[265] Fix | Delete
'on' => esc_html__( 'Yes', 'et_core' ),
[266] Fix | Delete
'off' => esc_html__( 'No', 'et_core' ),
[267] Fix | Delete
),
[268] Fix | Delete
'description' => esc_html__( 'Define whether or not the field should be visible.', 'et_core' ),
[269] Fix | Delete
'toggle_slug' => 'field_options',
[270] Fix | Delete
'readonly_if' => array(
[271] Fix | Delete
$readonly_dependency => self::$_predefined_custom_field_support,
[272] Fix | Delete
),
[273] Fix | Delete
'readonly_if_not' => array(
[274] Fix | Delete
$readonly_dependency => self::$_any_custom_field_type_support,
[275] Fix | Delete
),
[276] Fix | Delete
),
[277] Fix | Delete
'fullwidth_field' => array(
[278] Fix | Delete
'label' => esc_html__( 'Make Fullwidth', 'et_core' ),
[279] Fix | Delete
'type' => 'yes_no_button',
[280] Fix | Delete
'option_category' => 'layout',
[281] Fix | Delete
'options' => array(
[282] Fix | Delete
'on' => esc_html__( 'Yes', 'et_core' ),
[283] Fix | Delete
'off' => esc_html__( 'No', 'et_core' ),
[284] Fix | Delete
),
[285] Fix | Delete
'tab_slug' => 'advanced',
[286] Fix | Delete
'toggle_slug' => 'layout',
[287] Fix | Delete
'description' => esc_html__( 'If enabled, the field will take 100% of the width of the form, otherwise it will take 50%', 'et_core' ),
[288] Fix | Delete
'default' => array( 'parent:layout', array(
[289] Fix | Delete
'left_right' => 'on',
[290] Fix | Delete
'right_left' => 'on',
[291] Fix | Delete
'top_bottom' => 'off',
[292] Fix | Delete
'bottom_top' => 'off',
[293] Fix | Delete
)),
[294] Fix | Delete
),
[295] Fix | Delete
) );
[296] Fix | Delete
[297] Fix | Delete
if ( 'builder' === self::$owner ) {
[298] Fix | Delete
$fields = array_merge( $fields, array(
[299] Fix | Delete
'field_background_color' => array(
[300] Fix | Delete
'label' => esc_html__( 'Field Background Color', 'et_core' ),
[301] Fix | Delete
'description' => esc_html__( "Pick a color to fill the module's input fields.", 'et_core' ),
[302] Fix | Delete
'type' => 'color-alpha',
[303] Fix | Delete
'custom_color' => true,
[304] Fix | Delete
'toggle_slug' => 'form_field',
[305] Fix | Delete
'tab_slug' => 'advanced',
[306] Fix | Delete
),
[307] Fix | Delete
'conditional_logic' => array(
[308] Fix | Delete
'label' => esc_html__( 'Enable', 'et_core' ),
[309] Fix | Delete
'type' => 'yes_no_button',
[310] Fix | Delete
'option_category' => 'layout',
[311] Fix | Delete
'default' => 'off',
[312] Fix | Delete
'options' => array(
[313] Fix | Delete
'on' => esc_html__( 'Yes', 'et_core' ),
[314] Fix | Delete
'off' => esc_html__( 'No', 'et_core' ),
[315] Fix | Delete
),
[316] Fix | Delete
'description' => et_get_safe_localization( __( "Enabling conditional logic makes this field only visible when any or all of the rules below are fulfilled<br><strong>Note:</strong> Only fields with an unique and non-empty field ID can be used", 'et_core' ) ),
[317] Fix | Delete
'toggle_slug' => 'conditional_logic',
[318] Fix | Delete
),
[319] Fix | Delete
'conditional_logic_relation' => array(
[320] Fix | Delete
'label' => esc_html__( 'Relation', 'et_core' ),
[321] Fix | Delete
'type' => 'yes_no_button',
[322] Fix | Delete
'option_category' => 'layout',
[323] Fix | Delete
'options' => array(
[324] Fix | Delete
'on' => esc_html__( 'All', 'et_core' ),
[325] Fix | Delete
'off' => esc_html__( 'Any', 'et_core' ),
[326] Fix | Delete
),
[327] Fix | Delete
'default' => 'off',
[328] Fix | Delete
'button_options' => array(
[329] Fix | Delete
'button_type' => 'equal',
[330] Fix | Delete
),
[331] Fix | Delete
'description' => esc_html__( 'Choose whether any or all of the rules should be fulfilled', 'et_core' ),
[332] Fix | Delete
'toggle_slug' => 'conditional_logic',
[333] Fix | Delete
'show_if' => array(
[334] Fix | Delete
'conditional_logic' => 'on',
[335] Fix | Delete
),
[336] Fix | Delete
),
[337] Fix | Delete
'conditional_logic_rules' => array(
[338] Fix | Delete
'label' => esc_html__( 'Rules', 'et_core' ),
[339] Fix | Delete
'description' => esc_html__( 'Conditional logic rules can be used to hide and display different input fields conditionally based on how the visitor has interacted with different inputs.', 'et_core' ),
[340] Fix | Delete
'type' => 'conditional_logic',
[341] Fix | Delete
'option_category' => 'layout',
[342] Fix | Delete
'depends_show_if' => 'on',
[343] Fix | Delete
'toggle_slug' => 'conditional_logic',
[344] Fix | Delete
'show_if' => array(
[345] Fix | Delete
'conditional_logic' => 'on',
[346] Fix | Delete
),
[347] Fix | Delete
),
[348] Fix | Delete
) );
[349] Fix | Delete
}
[350] Fix | Delete
[351] Fix | Delete
if ( 'bloom' === self::$owner ) {
[352] Fix | Delete
foreach ( $fields as $field_slug => &$field ) {
[353] Fix | Delete
if ( 'use_custom_fields' !== $field_slug ) {
[354] Fix | Delete
self::$_->array_set( $field, 'show_if.use_custom_fields', 'on' );
[355] Fix | Delete
}
[356] Fix | Delete
}
[357] Fix | Delete
}
[358] Fix | Delete
[359] Fix | Delete
return $fields;
[360] Fix | Delete
}
[361] Fix | Delete
[362] Fix | Delete
protected static function _predefined_custom_field_select( $custom_fields, $provider, $account_name, $list_id = '' ) {
[363] Fix | Delete
$is_builder = 'builder' === self::$owner;
[364] Fix | Delete
$is_bloom = 'bloom' === self::$owner;
[365] Fix | Delete
$dependency = $is_builder ? 'parentModule:provider' : 'email_provider';
[366] Fix | Delete
$show_if = array(
[367] Fix | Delete
$dependency => $provider,
[368] Fix | Delete
);
[369] Fix | Delete
[370] Fix | Delete
if ( $is_bloom ) {
[371] Fix | Delete
$show_if['account_name'] = $account_name;
[372] Fix | Delete
}
[373] Fix | Delete
[374] Fix | Delete
if ( $list_id && $is_builder ) {
[375] Fix | Delete
$dependency = "parentModule:{$provider}_list";
[376] Fix | Delete
$show_if[ $dependency ] = "{$account_name}|{$list_id}";
[377] Fix | Delete
} else if ( $list_id && $is_bloom ) {
[378] Fix | Delete
$show_if['email_list'] = (string) $list_id;
[379] Fix | Delete
}
[380] Fix | Delete
[381] Fix | Delete
$options = array( 'none' => esc_html__( 'Choose a field...', 'et_core' ) );
[382] Fix | Delete
[383] Fix | Delete
foreach ( $custom_fields as $field ) {
[384] Fix | Delete
$field_id = isset( $field['group_id'] ) ? $field['group_id'] : $field['field_id'];
[385] Fix | Delete
$options[ $field_id ] = $field['name'];
[386] Fix | Delete
}
[387] Fix | Delete
[388] Fix | Delete
return array(
[389] Fix | Delete
'label' => esc_html__( 'Field', 'et_core' ),
[390] Fix | Delete
'type' => 'select',
[391] Fix | Delete
'options' => $options,
[392] Fix | Delete
'order' => array_keys( $options ),
[393] Fix | Delete
'show_if' => $show_if,
[394] Fix | Delete
'toggle_slug' => 'main_content',
[395] Fix | Delete
'default' => 'none',
[396] Fix | Delete
'description' => esc_html__( 'Choose a custom field. Custom fields must be defined in your email provider account.', 'et_core' ),
[397] Fix | Delete
);
[398] Fix | Delete
}
[399] Fix | Delete
[400] Fix | Delete
/**
[401] Fix | Delete
* Get field definitions
[402] Fix | Delete
*
[403] Fix | Delete
* @since 3.10
[404] Fix | Delete
*
[405] Fix | Delete
* @param string $type Accepts 'custom_field'
[406] Fix | Delete
* @param string $for Accepts 'builder', 'bloom'
[407] Fix | Delete
*
[408] Fix | Delete
* @return array
[409] Fix | Delete
*/
[410] Fix | Delete
public static function get_definitions( $for, $type = 'custom_field' ) {
[411] Fix | Delete
self::$owner = $for;
[412] Fix | Delete
$fields = array();
[413] Fix | Delete
[414] Fix | Delete
if ( 'custom_field' === $type ) {
[415] Fix | Delete
$fields = self::_custom_field_definitions();
[416] Fix | Delete
}
[417] Fix | Delete
[418] Fix | Delete
return $fields;
[419] Fix | Delete
}
[420] Fix | Delete
[421] Fix | Delete
public static function initialize() {
[422] Fix | Delete
self::$_ = ET_Core_Data_Utils::instance();
[423] Fix | Delete
self::$_providers = ET_Core_API_Email_Providers::instance();
[424] Fix | Delete
[425] Fix | Delete
self::$_predefined_custom_field_support = array_keys( self::$_providers->names_by_slug( 'all', 'predefined_custom_fields' ) );
[426] Fix | Delete
self::$_any_custom_field_type_support = self::$_providers->names_by_slug( 'all', 'any_custom_field_type' );
[427] Fix | Delete
}
[428] Fix | Delete
}
[429] Fix | Delete
[430] Fix | Delete
[431] Fix | Delete
ET_Core_API_Email_Fields::initialize();
[432] Fix | Delete
[433] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function