Make WordPress Core

Changeset 45449


Ignore:
Timestamp:
05/26/2019 10:04:04 PM (6 years ago)
Author:
johnbillion
Message:

Docs: Improve docs for variadic functions relating to widgets and their controls.

See #37402

File:
1 edited

Legend:

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

    r44585 r45449  
    338338 *                               panel and/or theme.
    339339 * }
     340 * @param mixed      ...$params       Optional additional parameters to pass to the callback function when it's called.
    340341 */
    341342function wp_register_sidebar_widget( $id, $name, $output_callback, $options = array() ) {
     
    465466 * @global array $_wp_deprecated_widgets_callbacks
    466467 *
    467  * @param int|string   $id               Sidebar ID.
    468  * @param string       $name             Sidebar display name.
    469  * @param callable     $control_callback Run when sidebar is displayed.
    470  * @param array $options {
     468 * @param int|string $id               Sidebar ID.
     469 * @param string     $name             Sidebar display name.
     470 * @param callable   $control_callback Run when sidebar is displayed.
     471 * @param array      $options {
    471472 *     Optional. Array or string of control options. Default empty array.
    472473 *
     
    477478 *                               text widget. The widget id will end up looking like `{$id_base}-{$unique_number}`.
    478479 * }
     480 * @param mixed      ...$params        Optional additional parameters to pass to the callback function when it's called.
    479481 */
    480482function wp_register_widget_control( $id, $name, $control_callback, $options = array() ) {
     
    540542 * @param array    $options         Optional. Widget control options. See wp_register_widget_control().
    541543 *                                  Default empty array.
     544 * @param mixed    ...$params       Optional additional parameters to pass to the callback function when it's called.
    542545 */
    543546function _register_widget_update_callback( $id_base, $update_callback, $options = array() ) {
     
    572575 * @param array      $options       Optional. Widget control options. See wp_register_widget_control().
    573576 *                                  Default empty array.
    574  */
     577 * @param mixed      ...$params     Optional additional parameters to pass to the callback function when it's called.
     578 */
     579
    575580function _register_widget_form_callback( $id, $name, $form_callback, $options = array() ) {
    576581    global $wp_registered_widget_controls;
Note: See TracChangeset for help on using the changeset viewer.