WordPress.org

Make WordPress Core

Ticket #25152: 25152.patch

File 25152.patch, 960 bytes (added by jdgrimes, 8 months ago)

Adds $callback_args parameter to wp_add_dashboard_widget()

  • src/wp-admin/includes/dashboard.php

     
    146146        do_action('do_meta_boxes', $screen->id, 'side', ''); 
    147147} 
    148148 
    149 function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null ) { 
     149function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null, $callback_args = null ) { 
    150150        $screen = get_current_screen(); 
    151151        global $wp_dashboard_control_callbacks; 
    152152 
     
    177177        if ( 'dashboard_browser_nag' === $widget_id ) 
    178178                $priority = 'high'; 
    179179 
    180         add_meta_box( $widget_id, $widget_name, $callback, $screen, $location, $priority ); 
     180        add_meta_box( $widget_id, $widget_name, $callback, $screen, $location, $priority, $callback_args ); 
    181181} 
    182182 
    183183function _wp_dashboard_control_callback( $dashboard, $meta_box ) {