X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/03f2fa83c13c1b532284205fa7efcab9b8b2c41f..d3947bc013df7edd54b46deed8230d2eeafc5ecb:/wp-admin/includes/dashboard.php diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 144fcc04..5a234857 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -130,14 +130,19 @@ function wp_dashboard_setup() { } /** + * Adds a new dashboard widget. * - * @global array $wp_dashboard_control_callbacks + * @since 2.7.0 * - * @param string $widget_id - * @param string $widget_name - * @param callable $callback - * @param callable $control_callback - * @param array $callback_args + * @global array $wp_dashboard_control_callbacks + * + * @param string $widget_id Widget ID (used in the 'id' attribute for the widget). + * @param string $widget_name Title of the widget. + * @param callable $callback Function that fills the widget with the desired content. + * The function should echo its output. + * @param callable $control_callback Optional. Function that outputs controls for the widget. Default null. + * @param array $callback_args Optional. Data that should be set as the $args property of the widget array + * (which is the second parameter passed to your callback). Default null. */ function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null, $callback_args = null ) { $screen = get_current_screen(); @@ -169,9 +174,13 @@ function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_ } /** + * Outputs controls for the current dashboard widget. + * + * @access private + * @since 2.7.0 * - * @param type $dashboard - * @param type $meta_box + * @param mixed $dashboard + * @param array $meta_box */ function _wp_dashboard_control_callback( $dashboard, $meta_box ) { echo '