From 2a2c1acd456d6628ee9abbc88df4ba53352898ed Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Sun, 26 Apr 2015 13:57:46 +1000 Subject: [PATCH] Keep existing options when saving colors --- includes/admin/settings/class-sp-settings-general.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/admin/settings/class-sp-settings-general.php b/includes/admin/settings/class-sp-settings-general.php index 7f91ce96..79293dbc 100644 --- a/includes/admin/settings/class-sp-settings-general.php +++ b/includes/admin/settings/class-sp-settings-general.php @@ -215,7 +215,9 @@ class SP_Settings_General extends SP_Settings_Page { 'link' => $link, ); - update_option( 'themeboy', $colors ); + $options = get_option( 'themeboy' ); + $options = array_merge( $options, $colors ); + update_option( 'themeboy', $options ); } } @@ -226,8 +228,8 @@ class SP_Settings_General extends SP_Settings_Page { * @return void */ public function timezone_setting() { - $current_offset = get_option('gmt_offset'); - $tzstring = get_option('timezone_string'); + $current_offset = get_option( 'gmt_offset' ); + $tzstring = get_option( 'timezone_string' ); $check_zone_info = true;