@@ -203,25 +203,24 @@ public function extend_color_scheme( $old_version, $new_version ) {
203203 }, true ) );
204204
205205 if ( $ add_alternate_scheme ) {
206- $ scheme = array (
207- array (
208- 'name ' => __ ( 'Alternate Scheme ' , STACKABLE_I18N ),
209- 'key ' => 'scheme-default-3 ' ,
210- 'colorScheme ' => array (
211- 'backgroundColor ' => array ( 'desktop ' => '#0f0e17 ' ),
212- 'headingColor ' => array ( 'desktop ' => '#fffffe ' ),
213- 'textColor ' => array ( 'desktop ' => '#fffffe ' ),
214- 'linkColor ' => array ( 'desktop ' => '#f00069 ' ),
215- 'accentColor ' => array ( 'desktop ' => '#f00069 ' ),
216- 'buttonBackgroundColor ' => array ( 'desktop ' => '#f00069 ' ),
217- 'buttonTextColor ' => array ( 'desktop ' => '#fffffe ' ),
218- 'buttonOutlineColor ' => array ( 'desktop ' => '#fffffe ' ),
219- ),
220- 'hideInPicker ' => false
221- )
206+ $ updated_schemes = get_option ( 'stackable_global_color_schemes ' , array () );
207+ $ updated_schemes [] = array (
208+ 'name ' => __ ( 'Alternate Scheme ' , STACKABLE_I18N ),
209+ 'key ' => 'scheme-default-3 ' ,
210+ 'colorScheme ' => array (
211+ 'backgroundColor ' => array ( 'desktop ' => '#0f0e17 ' ),
212+ 'headingColor ' => array ( 'desktop ' => '#fffffe ' ),
213+ 'textColor ' => array ( 'desktop ' => '#fffffe ' ),
214+ 'linkColor ' => array ( 'desktop ' => '#f00069 ' ),
215+ 'accentColor ' => array ( 'desktop ' => '#f00069 ' ),
216+ 'buttonBackgroundColor ' => array ( 'desktop ' => '#f00069 ' ),
217+ 'buttonTextColor ' => array ( 'desktop ' => '#fffffe ' ),
218+ 'buttonOutlineColor ' => array ( 'desktop ' => '#fffffe ' ),
219+ ),
220+ 'hideInPicker ' => false
222221 );
223222
224- update_option ( 'stackable_global_color_schemes ' , $ scheme );
223+ update_option ( 'stackable_global_color_schemes ' , $ updated_schemes );
225224 }
226225
227226 }
0 commit comments