1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help with little code for WPMU

Discussion in 'PHP & Perl' started by trecords, Feb 9, 2010.

  1. trecords

    trecords Registered Member

    Joined:
    Oct 5, 2008
    Messages:
    96
    Likes Received:
    87
    Hi,
    I want to use simple "text" widget as default widget for newly created blogs. I use:
    PHP:
    function default_widgets($blog_id) {
    add_option'widget_categories',
    array( 
    'title' => 'My Categories' ));
    update_blog_option($blog_id"sidebars_widgets",
    array(
    "sidebar-1" => array("text"),));
    }
    add_action('wpmu_new_blog''default_widgets');
    This code activates the text widget but it is impossible to add text in it. Please, can someone help me to make the default text widget with text in it.
    There are $text and $title variables, how can i use them?