Assigning default sidebar widgets

Hi forum,

creating a new blog and placing widgets in different sidebar / home areas are simple admin activities.

But there is no admin function for using default widgets for new blogs. As workaround there are some solution on level customizing themes using built-in php functions.

Questions:

1) Is there any plan to offer an appropriate admin function ?

2) Waht is the best choice of workarounds in the following environment:

a) there is only one theme in use

b) the theme is stable (changes – seldom)

c) count blogs is growing (appr. one blog monthly)

3) founden workarounds

a) http://mu.wordpress.org/forums/topic/12049

b) http://mu.wordpress.org/forums/topic/8041

Thank you in advance,

Michel

  • Aaron
    • Ex Staff

    Here’s an example of a plugin I use:

    function default_widgets($blog_id) {

    ////////////////Default widgets

    update_blog_option($blog_id, "sidebars_widgets",

    array("sidebar-1" => array("pages","recent-posts","categories")));

    }

    add_action('wpmu_new_blog', 'default_widgets');

    Essentially setup a blog exactly how you like, then look at it’s sidebars_widgets blog option, and recreate that array.