[wp-trac] [WordPress Trac] #42791: wp_add_dashboard_widget() should accept location and priority parameters

WordPress Trac noreply at wordpress.org
Mon Dec 4 03:55:06 UTC 2017


#42791: wp_add_dashboard_widget() should accept location and priority parameters
----------------------------------------+------------------------------
 Reporter:  johnbillion                 |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Administration              |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+------------------------------

Comment (by davidjlaietta):

 Attached diff includes $location and $priority arguments, and maintains
 similar logic for wp_add_dashboard_widget.

 If location is not set, it'll be set to normal unless it's a side widget.
 If priority is not set it will be set to core unless dashboard_browser_nag
 is set, then it'll be set to high.

 New usage:

 {{{
 wp_add_dashboard_widget( 'widget_id', 'Widget Name', callback_function,
 control_callback, array(), 'side', 'high' );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42791#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list