| @@ -1589,15 +1589,12 @@ | ||
| 1589 | 1589 | } |
| 1590 | 1590 | |
| 1591 | 1591 | // Do not add default value to the final settings, if there is no value at the |
| 1592 | 1592 | // data before the methods `on_import` or `on_export` called. |
| 1593 | - $has_value = isset( $element_data['settings'][ $control['name'] ] ); | |
| 1593 | + $has_value = isset( $element_data[ $control['name'] ] ); | |
| 1594 | 1594 | |
| 1595 | 1595 | if ( $has_value && method_exists( $control_class, $method ) ) { |
| 1596 | - $element_data['settings'][ $control['name'] ] = $control_class->{$method}( | |
| 1597 | - $element_data['settings'][ $control['name'] ], | |
| 1598 | - $control | |
| 1599 | - ); | |
| 1596 | + $element_data['settings'][ $control['name'] ] = $control_class->{$method}( $element->get_settings( $control['name'] ), $control ); | |
| 1600 | 1597 | } |
| 1601 | 1598 | |
| 1602 | 1599 | // On Export, check if the control has an argument 'export' => false. |
| 1603 | 1600 | if ( 'on_export' === $method && isset( $control['export'] ) && false === $control['export'] ) { |