WordPress.org

Make WordPress Core

Changeset 25454


Ignore:
Timestamp:
09/16/2013 06:06:05 PM (5 years ago)
Author:
nacin
Message:

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

props jdgrimes.
fixes #25152.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r25441 r25454  
    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;
     
    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
Note: See TracChangeset for help on using the changeset viewer.