Hello
I use a module that changes the background picture of a theme.
This is done with extra settings in the theme settings that is saved with system_theme_settings_submit in system.admin.inc.
There are exra settings like background_path, background_color etc in addition to the existing ones like toggle_logo and toggle_name.

I need to update only the extra ones like bakground_path from my custom module.
Can I do it with variabel_set without having alle the other settings? I have a custom form with only the information I need.

But I dont want to owerwrite all the other settings like
................
;i:1;s:9:"grid_mask"
;i:0;s:16:"rebuild_registry"
;i:0;s:13:"fix_css_limit"
;i:0;s:15:"background_path"
;s:52:"sites/default/files/fusion_starter_background_21.jpg"
;s:16:"background_color";s:0:""..................

Thanks kritro

Comments

briansea’s picture

I would do something like this:

$settings = variable_get('theme_settings', array());

$settings['background_path'] = 'PATH TO YOUR IMAGE';

variable_set('theme_settings', $settings);