Skip to content

Commit de07b1c

Browse files
committed
Fix for the reset section.
1 parent 5848fbd commit de07b1c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

ReduxCore/framework.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,7 +1566,7 @@ public function _validate_options( $plugin_options ) {
15661566
if( isset( $plugin_options['defaults-section'] ) ) {
15671567
$compiler = false;
15681568
foreach ($this->sections[$plugin_options['redux-section']]['fields'] as $field) {
1569-
unset($plugin_options[$field['id']]);
1569+
$plugin_options[$field['id']] = $this->options_defaults[$field['id']];
15701570
if (isset($field['compiler'])) {
15711571
$compiler = true;
15721572
}
@@ -1577,11 +1577,8 @@ public function _validate_options( $plugin_options ) {
15771577
}
15781578
$plugin_options['defaults'] = true;
15791579
unset( $plugin_options['compiler'], $plugin_options['import'], $plugin_options['import_code'], $plugin_options['redux-section'] );
1580-
if ( $this->args['database'] == 'transient' || $this->args['database'] == 'theme_mods' || $this->args['database'] == 'theme_mods_expanded' ) {
1581-
$this->set_options( $plugin_options );
1582-
return $this->options;
1583-
}
1584-
return $plugin_options;
1580+
$this->set_options( $plugin_options );
1581+
return $this->options;
15851582
}
15861583

15871584
// Validate fields (if needed)

0 commit comments

Comments
 (0)