wordpress/wp-content/themes/basic/themify/themify-builder/modules/module-widget.php
/**
     * Before Builder saves data, find all Widget modules and call
     * WP_Widget::update() method on widget instance data.
     *
     * @return array
     */
Before Builder saves data, find all Widget modules and call
WP_Widget::update() method on widget instance data.

@return array
Before Builder saves data find all Widget modules and call WP_Widget :: update () method on widget instance data . @return array
public function themify_builder_data_before_construct($builder_data, $post_id) {
	if (isset($builder_data[0]) && is_object($builder_data[0])) {
	    $builder_data = json_decode(json_encode($builder_data), true);
	}
	$check = json_encode($builder_data);
	if(strpos($check,'class_widget')!==false){
	    unset($check);
	    foreach ($builder_data as $row_index => $row) {
		if (!empty($row['cols'])) {
		    foreach ($row['cols'] as $col_index => $column) {
			if (!empty($column['modules'])) {
			    foreach ($column['modules'] as $module_index => $module) {
				if (!empty($module['cols'])) {
				    foreach ($module['cols'] as $sub_column_index => $sub_column) {
					if (!empty($sub_column['modules'])) {
					    foreach ($sub_column['modules'] as $sub_module_index => $sub_module) {
						if (isset($sub_module['mod_name']) && $sub_module['mod_name'] === 'widget') {
						    $builder_data[$row_index]['cols'][$col_index]['modules'][$module_index]['cols'][$sub_column_index]['modules'][$sub_module_index] = $this->call_widget_update($sub_module);
						}
					    }
					}
				    }
				}
				if (isset($module['mod_name']) && $module['mod_name'] === 'widget') {
				    $builder_data[$row_index]['cols'][$col_index]['modules'][$module_index] = $this->call_widget_update($module);
				}
			    }
			}
		    }
		}
	    }
	}
	return $builder_data;
    }
public function themify_builder_data_before_construct ( $ builder_data , $ post_id ) { if ( isset ( $ builder_data [ 0 ] ) && is_object ( $ builder_data [ 0 ] ) ) { $ builder_data = json_decode ( json_encode ( $ builder_data ) , true ) ; } $ check = json_encode ( $ builder_data ) ; if ( strpos ( $ check , 'class_widget' ) !== false ) { unset ( $ check ) ; foreach ( $ builder_data as $ row_index => $ row ) { if ( ! empty ( $ row [ 'cols' ] ) ) { foreach ( $ row [ 'cols' ] as $ col_index => $ column ) { if ( ! empty ( $ column [ 'modules' ] ) ) { foreach ( $ column [ 'modules' ] as $ module_index => $ module ) { if ( ! empty ( $ module [ 'cols' ] ) ) { foreach ( $ module [ 'cols' ] as $ sub_column_index => $ sub_column ) { if ( ! empty ( $ sub_column [ 'modules' ] ) ) { foreach ( $ sub_column [ 'modules' ] as $ sub_module_index => $ sub_module ) { if ( isset ( $ sub_module [ 'mod_name' ] ) && $ sub_module [ 'mod_name' ] === 'widget' ) { $ builder_data [ $ row_index ] [ 'cols' ] [ $ col_index ] [ 'modules' ] [ $ module_index ] [ 'cols' ] [ $ sub_column_index ] [ 'modules' ] [ $ sub_module_index ] = $ this -> call_widget_update ( $ sub_module ) ; } } } } } if ( isset ( $ module [ 'mod_name' ] ) && $ module [ 'mod_name' ] === 'widget' ) { $ builder_data [ $ row_index ] [ 'cols' ] [ $ col_index ] [ 'modules' ] [ $ module_index ] = $ this -> call_widget_update ( $ module ) ; } } } } } } } return $ builder_data ; }
Before Builder saves data, find all Widget modules and call
 WP_Widget::update() method on widget instance data.
Before Builder saves data find all Widget modules and call WP_Widget :: update () method on widget instance data .