WPMU new blog settings plugin
This plugin was updated to work with version 2.6 – see here.
In a new forum thread this week a WordPress MU user asked an old question: how to set the default timezone offset for new blogs? The solution proposed was to edit the wp-admin/includes/schema.php file (line 275). This of course should work but it involves in changing wpmu core files, an option I think is not the best one.
The option I propose is to set the default timezone offset option, and other options as well, using a plugin. This is really simple by using the wpmu_new_blog hook. The entire thing is less than 10 lines of code:
<?php
function new_blogs_setting( $blog_id ) {
//set your options here:
update_option('gmt_offset', 2);
// stop editing here
return;
}
add_action('wpmu_new_blog', 'new_blogs_setting');
?>
The plugin can be downloaded from here (wpmu_new_blog.zip) and needs to be droped in the mu-plugins directory. One can add any other default option settings. In the case were a change of an option for existing blogs is required, the script to set global options for all WPMU blogs may be used.
Did you find this post interesting? Please subscribe to my feed.
I’ll put the next line in the plugin:
//set your options here:
add_option(‘WPLANG’, ‘nl_NL’);
// stop editing here
But the language is still english instead of nl_NL (dutch)
What to do to change the default language for new created blogs in wpmu v1.5.1 ?
Thanks in advance
update_blog_option( $blog_id, ‘wplang’, ‘nl_NL’ );
I’m not sure why this is needed but I think it works. Please let me know.
Thx
This plugin doesn’t have any UI at all.
First of all, thanks for your plugin, a very usefull one !
Indead, as camner said if before, it doesn’t work on WPMU 2.6.
Activating the plugin results an error :
“Parse error: syntax error, unexpected T_RETURN in /homepages/xxxxxx/htdocs/mu/wp-content/plugins/wpmu_new_blog.php on line 19″
I’ll try to figure out what’s going one, but if you can help, that would be great
I forgot to close an “‘” on a delcaration…
Plugin Activeted Succefully !
http://www.ringofblogs.com/2007/12/21/wpmu-new-blog-settings-pluginwpmu-new-blog-settings-plugin/
Cheers
[...] 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 [...]
[...] WPMU New Blog Settings Plugin von Elad Salomons kann ein Default Timezone Offset für alle Blogs eingestellt werden. [...]