diff --git a/includes/wp-option-settings.php b/includes/wp-option-settings.php index 82739cc..e290e90 100644 --- a/includes/wp-option-settings.php +++ b/includes/wp-option-settings.php @@ -16,11 +16,16 @@ class WP_Option_Settings { /** * @param $option_name * @param array $default_settings + * @param bool|TRUE $granular_defaults */ - function __construct( $option_name, $default_settings = array() ){ + function __construct( $option_name, $default_settings = array(), $granular_defaults = true ){ $this->option_name = $option_name; $this->default_settings = $default_settings; $this->values = get_option( $this->option_name, $this->default_settings ); + + if ( $granular_defaults ) { + $this->values = array_replace_recursive( $this->default_settings, $this->values ); + } } function __get( $key ){