From 74da332c40c6efee5c45c15d494ea3a1c607ec1a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 6 Mar 2016 12:07:34 +0000 Subject: [PATCH] Docs: Add `wp_add_dashboard_widget()` parameter descriptions. Props meitar for initial patch. Fixes #36092. git-svn-id: https://develop.svn.wordpress.org/trunk@36868 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/dashboard.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index 141d49f41e..349acfacd0 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -130,14 +130,17 @@ function wp_dashboard_setup() { } /** + * Adds a new dashboard widget. * * @global array $wp_dashboard_control_callbacks * - * @param string $widget_id - * @param string $widget_name - * @param callable $callback - * @param callable $control_callback - * @param array $callback_args + * @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();