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
This commit is contained in:
Sergey Biryukov 2016-03-06 12:07:34 +00:00
parent e3feb63e33
commit 74da332c40
1 changed files with 8 additions and 5 deletions

View File

@ -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();