Make WordPress Core


Ignore:
Timestamp:
07/14/2020 11:54:26 AM (6 years ago)
Author:
johnbillion
Message:

Docs: Correct and improve inline docs for parameters that accept a callback function.

See #49572

File:
1 edited

Legend:

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

    r48408 r48473  
    788788                 *     An associative array of widget arguments.
    789789                 *
    790                  *     @type string $name                Name of the widget.
    791                  *     @type string $id                  Widget ID.
    792                  *     @type array|callable $callback    When the hook is fired on the front end, $callback is an array
    793                  *                                       containing the widget object. Fired on the back end, $callback
    794                  *                                       is 'wp_widget_control', see $_callback.
    795                  *     @type array          $params      An associative array of multi-widget arguments.
    796                  *     @type string         $classname   CSS class applied to the widget container.
    797                  *     @type string         $description The widget description.
    798                  *     @type array          $_callback   When the hook is fired on the back end, $_callback is populated
    799                  *                                       with an array containing the widget object, see $callback.
     790                 *     @type string   $name        Name of the widget.
     791                 *     @type string   $id          Widget ID.
     792                 *     @type callable $callback    When the hook is fired on the front end, $callback is an array
     793                 *                                 containing the widget object. Fired on the back end, $callback
     794                 *                                 is 'wp_widget_control', see $_callback.
     795                 *     @type array    $params      An associative array of multi-widget arguments.
     796                 *     @type string   $classname   CSS class applied to the widget container.
     797                 *     @type string   $description The widget description.
     798                 *     @type array    $_callback   When the hook is fired on the back end, $_callback is populated
     799                 *                                 with an array containing the widget object, see $callback.
    800800                 * }
    801801                 */
    … …  
    858858 * @global array $wp_registered_widgets
    859859 *
    860  * @param string|false $callback      Optional, Widget callback to check. Default false.
    861  * @param int|false    $widget_id     Optional. Widget ID. Optional, but needed for checking. Default false.
    862  * @param string|false $id_base       Optional. The base ID of a widget created by extending WP_Widget. Default false.
    863  * @param bool         $skip_inactive Optional. Whether to check in 'wp_inactive_widgets'. Default true.
     860 * @param callable|false $callback      Optional, Widget callback to check. Default false.
     861 * @param int|false      $widget_id     Optional. Widget ID. Optional, but needed for checking. Default false.
     862 * @param string|false   $id_base       Optional. The base ID of a widget created by extending WP_Widget. Default false.
     863 * @param bool           $skip_inactive Optional. Whether to check in 'wp_inactive_widgets'. Default true.
    864864 * @return string|false False if widget is not active or id of sidebar in which the widget is active.
    865865 */
Note: See TracChangeset for help on using the changeset viewer.