I have updated the WPMU new blog settings plugin to work with the new version of WordPress-Mu, 2.6 (for previous versions see here). The hook used was changed to a new one: populate_options and the update_option function call was replaced with the add_option function call. The main code of the plugin looks like so:
<?php
function new_blogs_setting( $blog_id ) {
//set your options here:
add_option('gmt_offset', 2);
// stop editing here
return;
}
add_action('populate_options', 'new_blogs_setting');
?>
Download here.
Did you find this post interesting? Please subscribe to my feed.
Comments 5
Dear Elad,
I’m not I programmer but I know few things about WPMU and its code. What would you suggest if I want to use your plugin for a new default widget. Lets say ‘Links’ widget. What would code look like? Thanks in advance.
Posted 22 Aug 2008 at 2:46 pm ¶I see you have done some coding here. Did you try to change ‘update_option’ with ‘add_option’?
Posted 22 Aug 2008 at 2:52 pm ¶No because I’m still using 1.5.1 and, as you wrote above – “function call was replaced with the add_option” in version 2.6. I plan to update when WPMU 2.6.1 and then I can try with add_option.
Posted 22 Aug 2008 at 3:33 pm ¶thanks a lot, your plugin is really help.
is this plugin support adding extra page, post and category?
i try to create default
about + 2 parent page + 2 child page
uncategory + 2 parent category + 2 child
3 default post
but always fail
there is have no problem when create it in wpmu-functions.php
thanks for your time
Posted 07 Sep 2008 at 8:32 am ¶Hi,
is it possible to have the button to view the slideshow in full screen enabled?
Posted 30 Sep 2008 at 8:29 am ¶Trackbacks & Pingbacks 1
[...] This plugin was updated to work with version 2.6 – see here. [...]
Post a Comment