Make WordPress Core

Changeset 30778


Ignore:
Timestamp:
12/07/2014 08:12:50 PM (10 years ago)
Author:
DrewAPicture
Message:

Flesh out and fix formatting in the DocBlock for wp_register_widget_control().

Includes:

  • Added todos for documenting $options in the hash notation style
  • Backtick-escaping and general formatting

See #30315.

File:
1 edited

Legend:

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

    r30776 r30778  
    993993 * multi-widgets (widgets which allow multiple instances such as the text
    994994 * widget), an id_base must be provided. The widget id will end up looking like
    995  * {$id_base}-{$unique_number}.
     995 * `{$id_base}-{$unique_number}`.
    996996 *
    997997 * @since 2.2.0
    998998 *
    999  * @param int|string $id Sidebar ID.
    1000  * @param string $name Sidebar display name.
    1001  * @param callback $control_callback Run when sidebar is displayed.
    1002  * @param array|string $options Optional. Widget options. See above long description.
    1003  */
    1004 function wp_register_widget_control($id, $name, $control_callback, $options = array()) {
     999 * @todo Document `$options` as a hash notation, re: WP_Widget::__construct() cross-reference.
     1000 * @todo `$params` parameter?
     1001 *
     1002 * @param int|string   $id               Sidebar ID.
     1003 * @param string       $name             Sidebar display name.
     1004 * @param callback     $control_callback Run when sidebar is displayed.
     1005 * @param array|string $options          Optional. Widget options. See description above. Default empty array.
     1006 */
     1007function wp_register_widget_control( $id, $name, $control_callback, $options = array() ) {
    10051008    global $wp_registered_widget_controls, $wp_registered_widget_updates, $wp_registered_widgets, $_wp_deprecated_widgets_callbacks;
    10061009
Note: See TracChangeset for help on using the changeset viewer.