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/settings/migratio...
File: BackgroundUI.php
<?php
[0] Fix | Delete
[1] Fix | Delete
[2] Fix | Delete
class ET_Builder_Module_Settings_Migration_BackgroundUI extends ET_Builder_Module_Settings_Migration {
[3] Fix | Delete
[4] Fix | Delete
public $version = '3.0.48';
[5] Fix | Delete
[6] Fix | Delete
public function get_fields() {
[7] Fix | Delete
return array(
[8] Fix | Delete
'background_image' => array(
[9] Fix | Delete
'affected_fields' => array(
[10] Fix | Delete
'background_url' => array( 'et_pb_fullwidth_header' ),
[11] Fix | Delete
),
[12] Fix | Delete
),
[13] Fix | Delete
'background_position' => array(
[14] Fix | Delete
'affected_fields' => array(
[15] Fix | Delete
'background_position' => $this->get_modules( true ),
[16] Fix | Delete
),
[17] Fix | Delete
'defaults' => array(
[18] Fix | Delete
'new' => 'center', // just fyi
[19] Fix | Delete
'old' => 'top_left',
[20] Fix | Delete
),
[21] Fix | Delete
),
[22] Fix | Delete
'background_repeat' => array(
[23] Fix | Delete
'affected_fields' => array(
[24] Fix | Delete
'background_repeat' => $this->get_modules( true ),
[25] Fix | Delete
),
[26] Fix | Delete
'defaults' => array(
[27] Fix | Delete
'new' => 'no-repeat', // just fyi
[28] Fix | Delete
'old' => 'repeat',
[29] Fix | Delete
),
[30] Fix | Delete
),
[31] Fix | Delete
'background_size' => array(
[32] Fix | Delete
'affected_fields' => array(
[33] Fix | Delete
'background_size' => $this->get_modules( true ),
[34] Fix | Delete
),
[35] Fix | Delete
'defaults' => array(
[36] Fix | Delete
'new' => 'cover', // just fyi
[37] Fix | Delete
'old' => 'initial',
[38] Fix | Delete
),
[39] Fix | Delete
),
[40] Fix | Delete
);
[41] Fix | Delete
}
[42] Fix | Delete
[43] Fix | Delete
public function get_modules( $for_affected_fields = false ) {
[44] Fix | Delete
$modules = array(
[45] Fix | Delete
'et_pb_audio',
[46] Fix | Delete
'et_pb_blurb',
[47] Fix | Delete
'et_pb_countdown_timer',
[48] Fix | Delete
'et_pb_cta',
[49] Fix | Delete
'et_pb_filterable_portfolio',
[50] Fix | Delete
'et_pb_fullwidth_portfolio',
[51] Fix | Delete
'et_pb_number_counter',
[52] Fix | Delete
'et_pb_team_member',
[53] Fix | Delete
'et_pb_portfolio',
[54] Fix | Delete
'et_pb_row',
[55] Fix | Delete
'et_pb_tab',
[56] Fix | Delete
'et_pb_tabs',
[57] Fix | Delete
'et_pb_testimonial',
[58] Fix | Delete
'et_pb_text',
[59] Fix | Delete
'et_pb_toggle',
[60] Fix | Delete
);
[61] Fix | Delete
[62] Fix | Delete
if ( ! $for_affected_fields ) {
[63] Fix | Delete
$modules[] = 'et_pb_fullwidth_header';
[64] Fix | Delete
}
[65] Fix | Delete
[66] Fix | Delete
return $modules;
[67] Fix | Delete
}
[68] Fix | Delete
[69] Fix | Delete
public function migrate( $field_name, $current_value, $module_slug, $saved_value, $saved_field_name, $attrs, $content, $module_address ) {
[70] Fix | Delete
if ( '' !== $current_value || 'background_image' === $field_name ) {
[71] Fix | Delete
return $current_value;
[72] Fix | Delete
}
[73] Fix | Delete
[74] Fix | Delete
return $this->fields[ $field_name ]['defaults']['old'];
[75] Fix | Delete
}
[76] Fix | Delete
}
[77] Fix | Delete
[78] Fix | Delete
return new ET_Builder_Module_Settings_Migration_BackgroundUI();
[79] Fix | Delete
[80] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function