class ET_Builder_Module_Settings_Migration_HoverOptions extends ET_Builder_Module_Settings_Migration {
public $version = '3.16';
public function get_modules( $group = '' ) {
'et_pb_fullwidth_post_slider',
'et_pb_fullwidth_slider',
$buttons = array( 'et_pb_fullwidth_header' );
return array_merge( $buttons, $button );
public function get_fields() {
$hover = et_pb_hover_options();
foreach ( $fields as $field ) {
$return[ $hover->get_hover_enabled_field( "button_{$field}" ) ] = array(
'affected_fields' => array(
"button_{$field}_hover" => $this->get_modules( 'button' ),
$return[ $hover->get_hover_field( "button_{$field}" ) ] = array(
'affected_fields' => array(
"button_{$field}_hover" => $this->get_modules( 'button' ),
$return[ $hover->get_hover_enabled_field( "button_one_{$field}" ) ] = array(
'affected_fields' => array(
"button_one_{$field}_hover" => $this->get_modules( 'buttons' ),
$return[ $hover->get_hover_field( "button_one_{$field}" ) ] = array(
'affected_fields' => array(
"button_one_{$field}_hover" => $this->get_modules( 'buttons' ),
$return[ $hover->get_hover_enabled_field( "button_two_{$field}" ) ] = array(
'affected_fields' => array(
"button_two_{$field}_hover" => $this->get_modules( 'buttons' ),
$return[ $hover->get_hover_field( "button_two_{$field}" ) ] = array(
'affected_fields' => array(
"button_two_{$field}_hover" => $this->get_modules( 'buttons' ),
public function migrate( $field_name, $current_value, $module_slug, $saved_value, $saved_field_name, $attrs, $content, $module_address ) {
if ( $field_name == et_pb_hover_options()->get_hover_field( $field_name ) ) {
return strlen( $current_value ) ? $current_value : null;
return strlen( $current_value ) ? 'on' : 'off';
return new ET_Builder_Module_Settings_Migration_HoverOptions();