Edit File by line
/home/barbar84/www/wp-conte.../themes/Divi/includes/builder/module/settings/migratio...
File: InnerShadowToBoxShadow.php
<?php
[0] Fix | Delete
[1] Fix | Delete
class ET_Builder_Module_Settings_Migration_InnerShadowToBoxShadow extends ET_Builder_Module_Settings_Migration {
[2] Fix | Delete
[3] Fix | Delete
public $version = '3.0.99';
[4] Fix | Delete
[5] Fix | Delete
public function get_modules( $group = '' ) {
[6] Fix | Delete
return array(
[7] Fix | Delete
'et_pb_slider',
[8] Fix | Delete
'et_pb_fullwidth_slider',
[9] Fix | Delete
'et_pb_post_slider',
[10] Fix | Delete
'et_pb_fullwidth_post_slider',
[11] Fix | Delete
);
[12] Fix | Delete
}
[13] Fix | Delete
[14] Fix | Delete
public function get_fields() {
[15] Fix | Delete
return array(
[16] Fix | Delete
'box_shadow_horizontal' => array(
[17] Fix | Delete
'affected_fields' => array(
[18] Fix | Delete
'box_shadow_style' => $this->get_modules(),
[19] Fix | Delete
),
[20] Fix | Delete
),
[21] Fix | Delete
'box_shadow_vertical' => array(
[22] Fix | Delete
'affected_fields' => array(
[23] Fix | Delete
'box_shadow_style' => $this->get_modules(),
[24] Fix | Delete
),
[25] Fix | Delete
),
[26] Fix | Delete
'box_shadow_blur' => array(
[27] Fix | Delete
'affected_fields' => array(
[28] Fix | Delete
'box_shadow_style' => $this->get_modules(),
[29] Fix | Delete
),
[30] Fix | Delete
),
[31] Fix | Delete
'box_shadow_spread' => array(
[32] Fix | Delete
'affected_fields' => array(
[33] Fix | Delete
'box_shadow_style' => $this->get_modules(),
[34] Fix | Delete
),
[35] Fix | Delete
),
[36] Fix | Delete
'box_shadow_position' => array(
[37] Fix | Delete
'affected_fields' => array(
[38] Fix | Delete
'box_shadow_style' => $this->get_modules(),
[39] Fix | Delete
),
[40] Fix | Delete
),
[41] Fix | Delete
'box_shadow_color' => array(
[42] Fix | Delete
'affected_fields' => array(
[43] Fix | Delete
'box_shadow_style' => $this->get_modules(),
[44] Fix | Delete
),
[45] Fix | Delete
),
[46] Fix | Delete
'box_shadow_style' => array(
[47] Fix | Delete
'affected_fields' => array(
[48] Fix | Delete
'show_inner_shadow' => $this->get_modules(),
[49] Fix | Delete
),
[50] Fix | Delete
),
[51] Fix | Delete
);
[52] Fix | Delete
}
[53] Fix | Delete
[54] Fix | Delete
public function migrate( $field_name, $current_value, $module_slug, $saved_value, $saved_field_name, $attrs, $content, $module_address ) {
[55] Fix | Delete
[56] Fix | Delete
switch ( $field_name ) {
[57] Fix | Delete
case 'box_shadow_style':
[58] Fix | Delete
return ( 'none' !== $saved_value || 'off' === $current_value ) ? $saved_value : 'preset6';
[59] Fix | Delete
case 'box_shadow_blur':
[60] Fix | Delete
return 'none' === $current_value ? '10px' : $saved_value;
[61] Fix | Delete
case 'box_shadow_position':
[62] Fix | Delete
return 'none' === $current_value ? 'inner' : $saved_value;
[63] Fix | Delete
case 'box_shadow_color':
[64] Fix | Delete
return 'none' === $current_value ? 'rgba(0,0,0,0.1)' : $saved_value;
[65] Fix | Delete
case 'box_shadow_horizontal':
[66] Fix | Delete
case 'box_shadow_vertical':
[67] Fix | Delete
case 'box_shadow_spread':
[68] Fix | Delete
return 'none' === $current_value ? '0px' : $saved_value;
[69] Fix | Delete
}
[70] Fix | Delete
[71] Fix | Delete
return $saved_value;
[72] Fix | Delete
}
[73] Fix | Delete
}
[74] Fix | Delete
[75] Fix | Delete
return new ET_Builder_Module_Settings_Migration_InnerShadowToBoxShadow();
[76] Fix | Delete
[77] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function