[wp-trac] [WordPress Trac] #25419: Add widget icons from customizer to widgets admin page (was: Add support to widgets for icons and screenshots)
WordPress Trac
noreply at wordpress.org
Wed Apr 16 19:40:48 UTC 2014
#25419: Add widget icons from customizer to widgets admin page
-------------------------------------+---------------------------------
Reporter: westonruter | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Widgets | Version:
Severity: minor | Resolution:
Keywords: needs-patch ui-feedback | Focuses: ui, administration
-------------------------------------+---------------------------------
Description changed by westonruter:
Old description:
> 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.
New description:
With the incorporation of live widget previews (widget customizer), an
available widget browser is displayed which lists all widgets along with a
dashicon for each. These icons should be incorporated into the widgets
admin page now, as well.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/25419#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list