How to add a description to Widgets?

The codex doesn’t seem to say how one would go about adding a description to a custom widget registered with wp_register_sidebar_widget(). The default description seems to be the name of teh widget itself.

function myFunc(){
  /* widget code */
}
wp_register_sidebar_widget( 'wdgt1', 'Site Map', 'myFunc', array() );

alt text

Related posts

Leave a Reply

3 comments

  1. it give a param for description in array of the function to register widget:

    register_sidebar()
    

    Example can you see on this post or this code.

    if ( function_exists('register_sidebar') ) {
        register_sidebar(array(
            'name' => 'My Lorem Ipsum Sidebar',
            'description' => __('Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.', 'your_textdomain'),
            'before_widget' => '<li id="%1$s" class="widget %2$s">',
            'after_widget' => '</li>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>',
        ));
    }