Default some widgets when a blog is created.


Ref: WPMU Ver.: 2.8.4

We are working on some custom functions that adds required pages, plugins, widgets automatically apart from the default stuff when a new blog is created.

1. Added additional posts/pages as required.
2. Added some code to have plugins to be active by default using >> update_blog_option($blogID, 'active_plugins', $default_plugins);
* $default_plugins is an array of plugins path.
3. Added code to activate some sidebar widgets
update_blog_option($blogID, 'sidebars_widgets', unserialize('a:4:{.....;i:3;}')); &
update_blog_option($blogID, 'widget_name', unserialize('a:7:{s:5:"....";}'));
All the above works well.

The issue is,
when for the 3rd above if we want to add a dynamic value to the string inside the "unserialize" fn()...say for eg:
$blogkeyword = "baseball";
unserialize('.....s:8:"keywords";s:6:"'.$blogkeyword.'";s:9:......;}':wink: does NOT does not get updated to the database.
It works well if the above is like:

Am I missing anything or doing anything wrong? Kindly advice....

Thanks & Regards