[resolved] Widget description? (3 posts)

  1. jeremyduffy
    Posted 7 years ago #

    I finally got around to playing with widget creation and so far so good, but I have several widgets controls in the same plugin. That works fine, but I'd love to put a description on them like all the default widgets in the list.

    How do I do that? Is it in the register command? I have this so far:

    register_widget_control(array('Jsearch Tags','widgets'),'widget_jsearch_tags_control');

    I can't seem to find the documentation that would allow a description, but I suspect it's there somewhere.

  2. jeremyduffy
    Posted 7 years ago #

    Did I post this in the wrong section or something? It can't be that no one at all knows the answer to this is it?

  3. jeremyduffy
    Posted 7 years ago #

    Here's the answer. Instead of using these like in the sample widgets:


    Use these:

    wp_register_sidebar_widget( 'WIDGETID', 'YOURTITLE', 'YOURFUNCNAME', array('description' => __('THEDESCRIPTION')) );
    wp_register_widget_control( 'WIDGETID', 'YOURTITLE', 'CNTRLFUNCNAME');

    There's fairly limited documentation on these functions currently, but I was able to find a working example in the widgets.php file in the wp-includes file.

Topic Closed

This topic has been closed to new replies.

About this Topic