Allow callback args to be passed from wp_add_dashboard_widget() to add_meta_box().

props jdgrimes.
fixes #25152.

Built from https://develop.svn.wordpress.org/trunk@25454


git-svn-id: http://core.svn.wordpress.org/trunk@25375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-09-16 18:07:10 +00:00
parent 5f9a631983
commit 4587da663f
1 changed files with 2 additions and 2 deletions

View File

@ -146,7 +146,7 @@ function wp_dashboard_setup() {
do_action('do_meta_boxes', $screen->id, 'side', '');
}
function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null ) {
function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null, $callback_args = null ) {
$screen = get_current_screen();
global $wp_dashboard_control_callbacks;
@ -177,7 +177,7 @@ function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_
if ( 'dashboard_browser_nag' === $widget_id )
$priority = 'high';
add_meta_box( $widget_id, $widget_name, $callback, $screen, $location, $priority );
add_meta_box( $widget_id, $widget_name, $callback, $screen, $location, $priority, $callback_args );
}
function _wp_dashboard_control_callback( $dashboard, $meta_box ) {