[wp-trac] [WordPress Trac] #25152: Ability to pass arguments to callback for dashboard widget

WordPress Trac noreply at wordpress.org
Mon Aug 26 20:47:14 UTC 2013


#25152: Ability to pass arguments to callback for dashboard widget
----------------------------+-----------------------------
 Reporter:  jdgrimes        |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:
 Severity:  normal          |   Keywords:  has-patch
----------------------------+-----------------------------
 There are times where it would be useful to be able to pass some arguments
 to the callback function for a dashboard widget when adding it with
 `wp_add_dashboard_widget()`. This would make it possible to have multiple
 'instances' of a dashboard widget if desired.

 For reference, I'm not the only one who has felt this need:
 http://wordpress.org/support/topic/add-parameters-to-the-callback-
 function-in-wp_add_dashboard_widget?replies=2

 Also, `add_meta_box()`, which `wp_add_dashboard_widget()` calls, already
 supports this. All we need to do is add another argument to
 `wp_add_dashboard_widget()` and pass it along to `add_meta_box()`. The
 attached patch does just that.

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


More information about the wp-trac mailing list