Make WordPress Core

Changeset 36868


Ignore:
Timestamp:
03/06/2016 12:07:34 PM (9 years ago)
Author:
SergeyBiryukov
Message:

Docs: Add wp_add_dashboard_widget() parameter descriptions.

Props meitar for initial patch.
Fixes #36092.

File:
1 edited

Legend:

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

    r36823 r36868  
    131131
    132132/**
     133 * Adds a new dashboard widget.
    133134 *
    134135 * @global array   $wp_dashboard_control_callbacks
    135136 *
    136  * @param string   $widget_id
    137  * @param string   $widget_name
    138  * @param callable $callback
    139  * @param callable $control_callback
    140  * @param array    $callback_args
     137 * @param string   $widget_id        Widget ID  (used in the 'id' attribute for the widget).
     138 * @param string   $widget_name      Title of the widget.
     139 * @param callable $callback         Function that fills the widget with the desired content.
     140 *                                   The function should echo its output.
     141 * @param callable $control_callback Optional. Function that outputs controls for the widget. Default null.
     142 * @param array    $callback_args    Optional. Data that should be set as the $args property of the widget array
     143 *                                   (which is the second parameter passed to your callback). Default null.
    141144 */
    142145function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null, $callback_args = null ) {
Note: See TracChangeset for help on using the changeset viewer.