This is the code i used when i decided to use array for storing options in my theme.<br>Code is self explanatory, feel free to contact me if you have any questions.<br><br><?php<br>function on_theme_activation(){<br> if ( get_option('swift_activation_check')!="set" ){<br>
//Checking if the user used the theme before<br> //Pick some variable from your theme and see if its set<br> if(get_option('swift_logo_url')){<br> foreach ($swift_options as $value) {<br>
$swift_opt[$value['id']]=get_option($value['id']);<br> delete_option($value['id']); <br> }<br> update_option('swift_opt',$swift_opt); <br>
}<br>} <br> // Add marker so it doesn't run in future<br> update_option('swift_activation_check', "set");<br><br>}<br>add_action('admin_head', 'first_run_options');<br>
?><br><br><br>Satish Gandham<br>