[wp-trac] [WordPress Trac] #25419: Add support to widgets for icons and screenshots

WordPress Trac noreply at wordpress.org
Wed Sep 25 17:05:07 UTC 2013


#25419: Add support to widgets for icons and screenshots
-----------------------------+-----------------------------
 Reporter:  westonruter      |      Owner:
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Widgets          |    Version:
 Severity:  minor            |   Keywords:  needs-ui
-----------------------------+-----------------------------
 In the work on the Widgets UI Refresh feature-as-plugin group, the idea
 was raised about adding support for icons and screenshots to widgets.
 Right now, widgets only have textual information (name and description) to
 clue in users as to what they do. If, however, widgets had icons then
 users would be able to much more quickly find the widget they're looking
 for (especially if they've used them before). Likewise, if a widget had a
 screenshot thumbnail which captured what a typical instance looks like,
 users would be able to more quickly decide if they want a widget or not.
 Admin menus already have icons, as `add_menu_page()` takes an `icon_url`
 as one of its arguments. Also, themes are supposed to have a
 `screenshot.png` which is then displayed on the theme picker.

 I'm suggesting that `WP_Widget` add support for `icon_url` and
 `screenshot_url` arguments:

 {{{
 class My_Widget extends WP_Widget {
         /* ... */
         function __construct() {
                 parent::__construct(
                         'my-wdiget', // Base ID
                         __( 'My Widget', 'text_domain'), // Name
                         array(
                                 'description' => __( 'So widgetized!',
 'text_domain' ),
                                 'icon_url' => plugin_dir_url( __FILE__ ) .
 '/icon.png',
                                 'screenshot_url' => plugin_dir_url(
 __FILE__ ) . '/screenshot.png',
                         )
                 );
         }
         /* ... */
 }}}

 The widget icons could then be displayed on the widgets page and anywhere
 else that widgets are managed, to allow them to be easily recognized. The
 `WP_Widget` would need to have a generic default widget icon, and icons
 should be created for all widgets distributed with core.

 For the widget screenshot, sure it would not be reflective of how it would
 exactly appear in the current theme, but it would give a good visual
 overview of what you’re going to get when you add the widget.

 The above functionality could (and should) be implemented first as a
 plugin (e.g. as part of the Widgets UI Refresh), but I wanted to create a
 ticket in Trac to capture the feature request and invite broader
 discussion.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25419>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list