Upgarded to 4.17.4

This commit is contained in:
2022-06-23 13:17:18 +01:00
parent 80f1e87db9
commit a04fb0c7af
404 changed files with 54683 additions and 4417 deletions

View File

@ -0,0 +1,318 @@
<?php
/**
* ET_Builder_Module_Settings_Migration_BackgroundGradientOverlaysImage.
*
* @package Divi
* @subpackage Builder
* @since 4.15.0
*/
/**
* Migrate Background Color Gradient Overlays Image option to 'off' based on condition.
*
* This migration will check three existing settings, and update as following:
*
* OLD:
* - use_background_color_gradient: on
* - background_color_gradient_overlays_image: on
* - parallax: on
*
* NEW:
* - background_color_gradient_overlays_image: off
*
* @package Divi
* @subpackage Builder/Migration
* @since 4.15.0
*/
/**
* Background Gradient Overlays Image migrations class.
*/
class ET_Builder_Module_Settings_Migration_BackgroundGradientOverlaysImage extends ET_Builder_Module_Settings_Migration {
/**
* The Divi release where this migration was introduced.
*
* @var string
*
* @since 4.15.0
*/
public $version = '4.15';
/**
* Array of modules to inspect for settings to migrate.
*
* Pass attribute and it will return selected modules only. Default return all affected modules.
*
* @param string $attr Attribute name.
*
* @return array
*
* @since 4.15.0
*/
public function get_modules( $attr = '' ) {
$modules = array();
// Background.
if ( in_array( $attr, array( '', 'module_bg' ), true ) ) {
// Structure Elements.
$modules[] = 'et_pb_column_inner';
$modules[] = 'et_pb_column_specialty';
$modules[] = 'et_pb_column';
$modules[] = 'et_pb_section_fullwidth';
$modules[] = 'et_pb_section_specialty';
$modules[] = 'et_pb_section';
$modules[] = 'et_pb_row_inner';
$modules[] = 'et_pb_row';
// Divi Content Modules.
$modules[] = 'et_pb_accordion_item';
$modules[] = 'et_pb_accordion';
$modules[] = 'et_pb_audio';
$modules[] = 'et_pb_blog';
$modules[] = 'et_pb_blurb';
$modules[] = 'et_pb_circle_counter';
$modules[] = 'et_pb_code';
$modules[] = 'et_pb_comments';
$modules[] = 'et_pb_contact_field';
$modules[] = 'et_pb_contact_form';
$modules[] = 'et_pb_countdown_timer';
$modules[] = 'et_pb_counter';
$modules[] = 'et_pb_counters';
$modules[] = 'et_pb_cta';
$modules[] = 'et_pb_divider';
$modules[] = 'et_pb_filterable_portfolio';
$modules[] = 'et_pb_gallery';
$modules[] = 'et_pb_image';
$modules[] = 'et_pb_login';
$modules[] = 'et_pb_map';
$modules[] = 'et_pb_menu';
$modules[] = 'et_pb_number_counter';
$modules[] = 'et_pb_portfolio';
$modules[] = 'et_pb_post_content';
$modules[] = 'et_pb_post_nav';
$modules[] = 'et_pb_post_slider';
$modules[] = 'et_pb_post_title';
$modules[] = 'et_pb_pricing_table';
$modules[] = 'et_pb_pricing_tables';
$modules[] = 'et_pb_search';
$modules[] = 'et_pb_shop';
$modules[] = 'et_pb_sidebar';
$modules[] = 'et_pb_signup_custom_field';
$modules[] = 'et_pb_signup';
$modules[] = 'et_pb_slide_fullwidth';
$modules[] = 'et_pb_slide';
$modules[] = 'et_pb_slider';
$modules[] = 'et_pb_social_media_follow';
$modules[] = 'et_pb_tab';
$modules[] = 'et_pb_tabs';
$modules[] = 'et_pb_team_member';
$modules[] = 'et_pb_testimonial';
$modules[] = 'et_pb_text';
$modules[] = 'et_pb_toggle';
$modules[] = 'et_pb_video_slider';
$modules[] = 'et_pb_video';
$modules[] = 'et_pb_fullwidth_code';
$modules[] = 'et_pb_fullwidth_header';
$modules[] = 'et_pb_fullwidth_image';
$modules[] = 'et_pb_fullwidth_map';
$modules[] = 'et_pb_fullwidth_menu';
$modules[] = 'et_pb_fullwidth_portfolio';
$modules[] = 'et_pb_fullwidth_post_content';
$modules[] = 'et_pb_fullwidth_post_slider';
$modules[] = 'et_pb_fullwidth_post_title';
$modules[] = 'et_pb_fullwidth_slider';
// WooCommerce Modules.
$modules[] = 'et_pb_wc_add_to_cart';
$modules[] = 'et_pb_wc_additional_info';
$modules[] = 'et_pb_wc_breadcrumb';
$modules[] = 'et_pb_wc_cart_notice';
$modules[] = 'et_pb_wc_description';
$modules[] = 'et_pb_wc_gallery';
$modules[] = 'et_pb_wc_images';
$modules[] = 'et_pb_wc_meta';
$modules[] = 'et_pb_wc_price';
$modules[] = 'et_pb_wc_rating';
$modules[] = 'et_pb_wc_related_products';
$modules[] = 'et_pb_wc_reviews';
$modules[] = 'et_pb_wc_stock';
$modules[] = 'et_pb_wc_tabs';
$modules[] = 'et_pb_wc_title';
$modules[] = 'et_pb_wc_upsells';
}
return $modules;
}
/**
* Get fields that are affected by this migration.
*
* @return array
*
* @since 4.15.0
*/
public function get_fields() {
return array(
'background_color_gradient_overlays_image' => array(
'affected_fields' => array(
'background_color_gradient_overlays_image' => $this->get_modules( 'module_bg' ),
),
),
'background_color_gradient_overlays_image_tablet' => array(
'affected_fields' => array(
'background_color_gradient_overlays_image_tablet' => $this->get_modules( 'module_bg' ),
),
),
'background_color_gradient_overlays_image_phone' => array(
'affected_fields' => array(
'background_color_gradient_overlays_image_phone' => $this->get_modules( 'module_bg' ),
),
),
'background_color_gradient_overlays_image__hover' => array(
'affected_fields' => array(
'background_color_gradient_overlays_image__hover' => $this->get_modules( 'module_bg' ),
),
),
'background_color_gradient_overlays_image__sticky' => array(
'affected_fields' => array(
'background_color_gradient_overlays_image__sticky' => $this->get_modules( 'module_bg' ),
),
),
);
}
/**
* Migrate.
*
* @param string $to_field_name This migration's target field.
* @param string|array $affected_field_value Affected field reference value.
* @param string|number $module_slug Current module type.
* @param string $to_field_value Migration target's current value.
* @param string $affected_field_name Affected field attribute name.
* @param array $module_attrs Current module's full attributes.
* @param string $module_content Current module's content.
* @param string|number $module_address Current module's address.
*
* @return string
*
* @since 4.15.0
*/
public function migrate(
$to_field_name,
$affected_field_value,
$module_slug,
$to_field_value,
$affected_field_name,
$module_attrs,
$module_content,
$module_address
) {
// Early exit if affected field ("Use Gradient" or "Parallax") is not "on".
if ( 'on' !== $affected_field_value ) {
return $affected_field_value;
}
$default_settings = array(
'use_gradient' => 'off',
'overlays_image' => ET_Global_Settings::get_value( 'all_background_gradient_overlays_image' ),
'parallax' => 'off',
);
$old_values = $default_settings;
// Collect the old settings.
switch ( $affected_field_name ) {
// Desktop View.
case 'background_color_gradient_overlays_image':
if ( ! isset( $module_attrs[ $affected_field_name ] ) ) {
return $affected_field_value;
} else {
$old_values['use_gradient'] = $this->_get_attr_value( 'use_background_color_gradient', $module_attrs );
$old_values['overlays_image'] = $this->_get_attr_value( 'background_color_gradient_overlays_image', $module_attrs );
$old_values['parallax'] = $this->_get_attr_value( 'parallax', $module_attrs );
}
break;
// Tablet View.
case 'background_color_gradient_overlays_image_tablet':
if ( ! isset( $module_attrs[ $affected_field_name ] ) ) {
return $affected_field_value;
} else {
$old_values['use_gradient'] = $this->_get_attr_value( 'use_background_color_gradient_tablet', $module_attrs );
$old_values['overlays_image'] = $this->_get_attr_value( 'background_color_gradient_overlays_image_tablet', $module_attrs );
$old_values['parallax'] = $this->_get_attr_value( 'parallax_tablet', $module_attrs );
}
break;
// Phone View.
case 'background_color_gradient_overlays_image_phone':
if ( ! isset( $module_attrs[ $affected_field_name ] ) ) {
return $affected_field_value;
} else {
$old_values['use_gradient'] = $this->_get_attr_value( 'use_background_color_gradient_phone', $module_attrs );
$old_values['overlays_image'] = $this->_get_attr_value( 'background_color_gradient_overlays_image_phone', $module_attrs );
$old_values['parallax'] = $this->_get_attr_value( 'parallax_phone', $module_attrs );
}
break;
// Hover Mode.
case 'background_color_gradient_overlays_image__hover':
if ( ! isset( $module_attrs[ $affected_field_name ] ) ) {
return $affected_field_value;
} else {
$old_values['use_gradient'] = $this->_get_attr_value( 'use_background_color_gradient__hover', $module_attrs );
$old_values['overlays_image'] = $this->_get_attr_value( 'background_color_gradient_overlays_image__hover', $module_attrs );
$old_values['parallax'] = $this->_get_attr_value( 'parallax__hover', $module_attrs );
}
break;
// Sticky Mode.
case 'background_color_gradient_overlays_image__sticky':
if ( ! isset( $module_attrs[ $affected_field_name ] ) ) {
return $affected_field_value;
} else {
$old_values['use_gradient'] = $this->_get_attr_value( 'use_background_color_gradient__sticky', $module_attrs );
$old_values['overlays_image'] = $this->_get_attr_value( 'background_color_gradient_overlays_image__sticky', $module_attrs );
$old_values['parallax'] = $this->_get_attr_value( 'parallax__sticky', $module_attrs );
}
break;
default:
return $affected_field_value;
}
// If overlays_image aren't defined, pull in global default settings.
if ( empty( $old_values['use_gradient'] ) ) {
$old_values['use_gradient'] = $default_settings['use_gradient'];
}
if ( empty( $old_values['overlays_image'] ) ) {
$old_values['overlays_image'] = $default_settings['overlays_image'];
}
if ( empty( $old_values['parallax'] ) ) {
$old_values['parallax'] = $default_settings['parallax'];
}
// New value for overlays_image.
return 'on' === $old_values['use_gradient'] && 'on' === $old_values['overlays_image'] && 'on' === $old_values['parallax']
? 'off' : $affected_field_value;
}
/**
* Get attributes value by field_name.
*
* @param string $field_name Field name.
* @param array $module_attrs Module's full attributes.
*
* @return string
*/
private function _get_attr_value( $field_name, $module_attrs ) {
if ( array_key_exists( $field_name, $module_attrs ) ) {
return $module_attrs[ $field_name ];
}
return '';
}
}
return new ET_Builder_Module_Settings_Migration_BackgroundGradientOverlaysImage();

File diff suppressed because it is too large Load Diff

View File

@ -66,14 +66,15 @@ class ET_Builder_Module_Settings_Migration_ColumnOptions extends ET_Builder_Modu
'custom_css_main',
'custom_css_after',
'use_background_color_gradient',
'background_color_gradient_stops',
'background_color_gradient_type',
'background_color_gradient_direction',
'background_color_gradient_direction_radial',
'background_color_gradient_overlays_image',
'background_color_gradient_start',
'background_color_gradient_end',
'background_color_gradient_start_position',
'background_color_gradient_end_position',
'background_color_gradient_overlays_image',
'background_video_mp4',
'background_video_webm',
'background_video_width',

View File

@ -0,0 +1,85 @@
<?php
/**
* ET_Builder_Module_Settings_Migration_ContactFormUniqueID class file.
*
* @class ET_Builder_Module_Settings_Migration_ContactFormUniqueID
* @package Builder/Module/Settings/Migration
*/
/**
* Migration process to fill in missing unique_id attribute on Contact Form module.
*
* @since 4.13.1
*/
class ET_Builder_Module_Settings_Migration_ContactFormUniqueID extends ET_Builder_Module_Settings_Migration {
/**
* Migration Version
*
* @since 4.13.1
*
* @var string
*/
public $version = '4.13.1';
/**
* Get the field that need to be migrated.
*
* Contains array with:
* - key as new field
* - value consists affected fields as old field and module location
*
* @since 4.13.1
*
* @return array New and old fields need to be migrated.
*/
public function get_fields() {
return array(
// Unique ID of Contact Form module.
'_unique_id' => array(
'affected_fields' => array(
'_unique_id' => $this->get_modules(),
),
),
);
}
/**
* Get all modules affected.
*
* @since 4.13.1
*
* @return array
*/
public function get_modules() {
return array( 'et_pb_contact_form' );
}
/**
* Run migrate process.
*
* @since 4.13.1
*
* @param string $field_name Field name.
* @param string $current_value Current value.
* @param string $module_slug Module slug.
* @param string $saved_value Saved value.
* @param string $saved_field_name Saved field name.
* @param string $attrs Module attributes values.
* @param string $content Module content.
* @param string $module_address Module address.
*
* @return string New value.
*/
public function migrate( $field_name, $current_value, $module_slug, $saved_value, $saved_field_name, $attrs, $content, $module_address ) {
// Setup unique ID for Contact Form module. Only do this when the current page is
// builder and not on the FE because it mays create incorrect unique ID.
if ( '_unique_id' === $field_name && function_exists( 'et_fb_is_enabled' ) && et_fb_is_enabled() ) {
return ET_Core_Data_Utils::uuid_v4();
}
return $current_value;
}
}
return new ET_Builder_Module_Settings_Migration_ContactFormUniqueID();

View File

@ -526,7 +526,7 @@ class ET_Builder_Module_Settings_Migration_IconManager extends ET_Builder_Module
return '';
}
return et_pb_process_font_icon( $this->_current_value ) . '||divi||' . et_pb_get_normal_font_weight_value();
return et_pb_build_extended_font_icon_value( $this->_current_value );
}
/**

View File

@ -0,0 +1,632 @@
<?php
/**
* Migration: Woo v2 modules
*
* Contains Woo Notice and Woo Add to cart modules migrations.
*
* @since 4.14.0
* @package Divi
*/
defined( 'ABSPATH' ) || exit;
/**
* Text OG Migration Class.
*
* Migrates Text OG fields to Title OG in Woo Cart Notice.
* Migrates Text OG fields to Field Labels OG in Woo Add to Cart.
*/
class ET_Builder_Module_Settings_Migration_WooTextOG extends ET_Builder_Module_Settings_Migration {
/**
* Gets the modules that needs migration.
*
* @used-by ET_Builder_Module_Settings_Migration::handle_field_name_migrations()
*
* @return string[]
*/
public function get_modules() {
return array(
'et_pb_wc_cart_notice',
'et_pb_wc_add_to_cart',
);
}
// phpcs:ignore Squiz.Commenting.FunctionComment.Missing -- Paresh's PR contains function comment.
public function get_fields() {
// phpcs:disable WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned -- Invalid warning.
// phpcs:disable WordPress.Arrays.MultipleStatementAlignment.LongIndexSpaceBeforeDoubleArrow -- Invalid warning.
return array(
// Migration 01: Cart Notice.
// Text Font, weight & style.
'title_font' => array(
'affected_fields' => array(
'body_font' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_font_last_edited' => array(
'affected_fields' => array(
'body_font_last_edited' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_font_tablet' => array(
'affected_fields' => array(
'body_font_tablet' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_font_phone' => array(
'affected_fields' => array(
'body_font_phone' => array( 'et_pb_wc_cart_notice' ),
),
),
// Text Color.
'title_text_color' => array(
'affected_fields' => array(
'body_text_color' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_color_last_edited' => array(
'affected_fields' => array(
'body_text_color_last_edited' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_color_tablet' => array(
'affected_fields' => array(
'body_text_color_tablet' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_color_phone' => array(
'affected_fields' => array(
'body_text_color_phone' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_color__hover_enabled' => array(
'affected_fields' => array(
'body_text_color__hover_enabled' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_color__hover' => array(
'affected_fields' => array(
'body_text_color__hover' => array( 'et_pb_wc_cart_notice' ),
),
),
// Text Size.
'title_font_size' => array(
'affected_fields' => array(
'body_font_size' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_font_size_last_edited' => array(
'affected_fields' => array(
'body_font_size_last_edited' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_font_size_tablet' => array(
'affected_fields' => array(
'body_font_size_tablet' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_font_size_phone' => array(
'affected_fields' => array(
'body_font_size_phone' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_font_size__hover_enabled' => array(
'affected_fields' => array(
'body_font_size__hover_enabled' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_font_size__hover' => array(
'affected_fields' => array(
'body_font_size__hover' => array( 'et_pb_wc_cart_notice' ),
),
),
// Text Letter spacing.
'title_letter_spacing' => array(
'affected_fields' => array(
'body_letter_spacing' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_letter_spacing_last_edited' => array(
'affected_fields' => array(
'body_letter_spacing_last_edited' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_letter_spacing_tablet' => array(
'affected_fields' => array(
'body_letter_spacing_tablet' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_letter_spacing_phone' => array(
'affected_fields' => array(
'body_letter_spacing_phone' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_letter_spacing__hover_enabled' => array(
'affected_fields' => array(
'body_letter_spacing__hover_enabled' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_letter_spacing__hover' => array(
'affected_fields' => array(
'body_letter_spacing__hover' => array( 'et_pb_wc_cart_notice' ),
),
),
// Text Line height.
'title_line_height' => array(
'affected_fields' => array(
'body_line_height' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_line_height_last_edited' => array(
'affected_fields' => array(
'body_line_height_last_edited' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_line_height_tablet' => array(
'affected_fields' => array(
'body_line_height_tablet' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_line_height_phone' => array(
'affected_fields' => array(
'body_line_height_phone' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_line_height__hover_enabled' => array(
'affected_fields' => array(
'body_line_height__hover_enabled' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_line_height__hover' => array(
'affected_fields' => array(
'body_line_height__hover' => array( 'et_pb_wc_cart_notice' ),
),
),
// Text horizontal shadow.
'title_text_shadow_style' => array(
'affected_fields' => array(
'body_text_shadow_style' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_horizontal_length' => array(
'affected_fields' => array(
'body_text_shadow_horizontal_length' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_horizontal_length_last_edited' => array(
'affected_fields' => array(
'body_text_shadow_horizontal_length_last_edited' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_horizontal_length_tablet' => array(
'affected_fields' => array(
'body_text_shadow_horizontal_length_tablet' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_horizontal_length_phone' => array(
'affected_fields' => array(
'body_text_shadow_horizontal_length_phone' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_horizontal_length__hover_enabled' => array(
'affected_fields' => array(
'body_text_shadow_horizontal_length__hover_enabled' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_horizontal_length__hover' => array(
'affected_fields' => array(
'body_text_shadow_horizontal_length__hover' => array( 'et_pb_wc_cart_notice' ),
),
),
// Text vertical shadow.
'title_text_shadow_vertical_length' => array(
'affected_fields' => array(
'body_text_shadow_vertical_length' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_vertical_length_last_edited' => array(
'affected_fields' => array(
'body_text_shadow_vertical_length_last_edited' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_vertical_length_tablet' => array(
'affected_fields' => array(
'body_text_shadow_vertical_length_tablet' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_vertical_length_phone' => array(
'affected_fields' => array(
'body_text_shadow_vertical_length_phone' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_vertical_length__hover_enabled' => array(
'affected_fields' => array(
'body_text_shadow_vertical_length__hover_enabled' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_vertical_length__hover' => array(
'affected_fields' => array(
'body_text_shadow_vertical_length__hover' => array( 'et_pb_wc_cart_notice' ),
),
),
// Text Blur strength.
'title_text_shadow_blur_strength' => array(
'affected_fields' => array(
'body_text_shadow_blur_strength' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_blur_strength_last_edited' => array(
'affected_fields' => array(
'body_text_shadow_blur_strength_last_edited' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_blur_strength_tablet' => array(
'affected_fields' => array(
'body_text_shadow_blur_strength_tablet' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_body_text_shadow_blur_strength_phone' => array(
'affected_fields' => array(
'body_text_shadow_blur_strength_phone' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_blur_strength__hover_enabled' => array(
'affected_fields' => array(
'body_text_shadow_blur_strength__hover_enabled' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_blur_strength__hover' => array(
'affected_fields' => array(
'body_text_shadow_blur_strength__hover' => array( 'et_pb_wc_cart_notice' ),
),
),
// Text Shadow color.
'title_text_shadow_color' => array(
'affected_fields' => array(
'body_text_shadow_color' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_color_last_edited' => array(
'affected_fields' => array(
'body_text_shadow_color_last_edited' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_color_tablet' => array(
'affected_fields' => array(
'body_text_shadow_color_tablet' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_color_phone' => array(
'affected_fields' => array(
'body_text_shadow_color_phone' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_color__hover_enabled' => array(
'affected_fields' => array(
'body_text_shadow_color__hover_enabled' => array( 'et_pb_wc_cart_notice' ),
),
),
'title_text_shadow_color__hover' => array(
'affected_fields' => array(
'body_text_shadow_color__hover' => array( 'et_pb_wc_cart_notice' ),
),
),
// Migration 01: Add to Cart.
// Text Font, weight & style.
'field_label_font' => array(
'affected_fields' => array(
'body_font' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_font_last_edited' => array(
'affected_fields' => array(
'body_font_last_edited' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_font_tablet' => array(
'affected_fields' => array(
'body_font_tablet' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_font_phone' => array(
'affected_fields' => array(
'body_font_phone' => array( 'et_pb_wc_add_to_cart' ),
),
),
// Text Color.
'field_label_text_color' => array(
'affected_fields' => array(
'body_text_color' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_color_last_edited' => array(
'affected_fields' => array(
'body_text_color_last_edited' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_color_tablet' => array(
'affected_fields' => array(
'body_text_color_tablet' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_color_phone' => array(
'affected_fields' => array(
'body_text_color_phone' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_color__hover_enabled' => array(
'affected_fields' => array(
'body_text_color__hover_enabled' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_color__hover' => array(
'affected_fields' => array(
'body_text_color__hover' => array( 'et_pb_wc_add_to_cart' ),
),
),
// Text Size.
'field_label_font_size' => array(
'affected_fields' => array(
'body_font_size' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_font_size_last_edited' => array(
'affected_fields' => array(
'body_font_size_last_edited' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_font_size_tablet' => array(
'affected_fields' => array(
'body_font_size_tablet' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_font_size_phone' => array(
'affected_fields' => array(
'body_font_size_phone' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_font_size__hover_enabled' => array(
'affected_fields' => array(
'body_font_size__hover_enabled' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_font_size__hover' => array(
'affected_fields' => array(
'body_font_size__hover' => array( 'et_pb_wc_add_to_cart' ),
),
),
// Text Letter spacing.
'field_label_letter_spacing' => array(
'affected_fields' => array(
'body_letter_spacing' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_letter_spacing_last_edited' => array(
'affected_fields' => array(
'body_letter_spacing_last_edited' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_letter_spacing_tablet' => array(
'affected_fields' => array(
'body_letter_spacing_tablet' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_letter_spacing_phone' => array(
'affected_fields' => array(
'body_letter_spacing_phone' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_letter_spacing__hover_enabled' => array(
'affected_fields' => array(
'body_letter_spacing__hover_enabled' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_letter_spacing__hover' => array(
'affected_fields' => array(
'body_letter_spacing__hover' => array( 'et_pb_wc_add_to_cart' ),
),
),
// Text Line height.
'field_label_line_height' => array(
'affected_fields' => array(
'body_line_height' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_line_height_last_edited' => array(
'affected_fields' => array(
'body_line_height_last_edited' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_line_height_tablet' => array(
'affected_fields' => array(
'body_line_height_tablet' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_line_height_phone' => array(
'affected_fields' => array(
'body_line_height_phone' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_line_height__hover_enabled' => array(
'affected_fields' => array(
'body_line_height__hover_enabled' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_line_height__hover' => array(
'affected_fields' => array(
'body_line_height__hover' => array( 'et_pb_wc_add_to_cart' ),
),
),
// Text horizontal shadow.
'field_label_text_shadow_style' => array(
'affected_fields' => array(
'body_text_shadow_style' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_horizontal_length' => array(
'affected_fields' => array(
'body_text_shadow_horizontal_length' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_horizontal_length_last_edited' => array(
'affected_fields' => array(
'body_text_shadow_horizontal_length_last_edited' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_horizontal_length_tablet' => array(
'affected_fields' => array(
'body_text_shadow_horizontal_length_tablet' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_horizontal_length_phone' => array(
'affected_fields' => array(
'body_text_shadow_horizontal_length_phone' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_horizontal_length__hover_enabled' => array(
'affected_fields' => array(
'body_text_shadow_horizontal_length__hover_enabled' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_horizontal_length__hover' => array(
'affected_fields' => array(
'body_text_shadow_horizontal_length__hover' => array( 'et_pb_wc_add_to_cart' ),
),
),
// Text vertical shadow.
'field_label_text_shadow_vertical_length' => array(
'affected_fields' => array(
'body_text_shadow_vertical_length' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_vertical_length_last_edited' => array(
'affected_fields' => array(
'body_text_shadow_vertical_length_last_edited' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_vertical_length_tablet' => array(
'affected_fields' => array(
'body_text_shadow_vertical_length_tablet' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_vertical_length_phone' => array(
'affected_fields' => array(
'body_text_shadow_vertical_length_phone' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_vertical_length__hover_enabled' => array(
'affected_fields' => array(
'body_text_shadow_vertical_length__hover_enabled' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_vertical_length__hover' => array(
'affected_fields' => array(
'body_text_shadow_vertical_length__hover' => array( 'et_pb_wc_add_to_cart' ),
),
),
// Text Blur strength.
'field_label_text_shadow_blur_strength' => array(
'affected_fields' => array(
'body_text_shadow_blur_strength' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_blur_strength_last_edited' => array(
'affected_fields' => array(
'body_text_shadow_blur_strength_last_edited' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_blur_strength_tablet' => array(
'affected_fields' => array(
'body_text_shadow_blur_strength_tablet' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_body_text_shadow_blur_strength_phone' => array(
'affected_fields' => array(
'body_text_shadow_blur_strength_phone' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_blur_strength__hover_enabled' => array(
'affected_fields' => array(
'body_text_shadow_blur_strength__hover_enabled' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_blur_strength__hover' => array(
'affected_fields' => array(
'body_text_shadow_blur_strength__hover' => array( 'et_pb_wc_add_to_cart' ),
),
),
// Text Shadow color.
'field_label_text_shadow_color' => array(
'affected_fields' => array(
'body_text_shadow_color' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_color_last_edited' => array(
'affected_fields' => array(
'body_text_shadow_color_last_edited' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_color_tablet' => array(
'affected_fields' => array(
'body_text_shadow_color_tablet' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_color_phone' => array(
'affected_fields' => array(
'body_text_shadow_color_phone' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_color__hover_enabled' => array(
'affected_fields' => array(
'body_text_shadow_color__hover_enabled' => array( 'et_pb_wc_add_to_cart' ),
),
),
'field_label_text_shadow_color__hover' => array(
'affected_fields' => array(
'body_text_shadow_color__hover' => array( 'et_pb_wc_add_to_cart' ),
),
),
);
// phpcs:enable WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned -- Invalid warning.
// phpcs:enable WordPress.Arrays.MultipleStatementAlignment.LongIndexSpaceBeforeDoubleArrow -- Invalid warning.
}
// phpcs:ignore Squiz.Commenting.FunctionComment.Missing -- Paresh's PR contains function comment.
public function migrate(
$field_name,
$current_value,
$module_slug,
$saved_value,
$saved_field_name,
$attrs,
$content,
$module_address
) {
// Don't migrate empty value.
if ( ! empty( $current_value ) ) {
return $current_value;
}
return $saved_value;
}
}
return new ET_Builder_Module_Settings_Migration_WooTextOG();