From 0fcf24a38e92eb07e14926404df5e03096f80a6c Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Fri, 11 Dec 2015 15:24:28 +0000 Subject: [PATCH] Docs: Document the optional `$options` parameter for `wp_register_widget_control()` as a hash notation. Props stephanethomas. Fixes #34855. Built from https://develop.svn.wordpress.org/trunk@35864 git-svn-id: http://core.svn.wordpress.org/trunk@35828 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-includes/widgets.php | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index e0d76aecfe..8b9ee2ec2e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-35863'; +$wp_version = '4.5-alpha-35864'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index 5a2f58c5dc..d670afc4db 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -445,16 +445,8 @@ function wp_unregister_sidebar_widget($id) { /** * Registers widget control callback for customizing options. * - * The options contains the 'height', 'width', and 'id_base' keys. The 'height' - * option is never used. The 'width' option is the width of the fully expanded - * control form, but try hard to use the default width. The 'id_base' is for - * multi-widgets (widgets which allow multiple instances such as the text - * widget), an id_base must be provided. The widget id will end up looking like - * `{$id_base}-{$unique_number}`. - * * @since 2.2.0 * - * @todo Document `$options` as a hash notation, re: WP_Widget::__construct() cross-reference. * @todo `$params` parameter? * * @global array $wp_registered_widget_controls @@ -465,7 +457,15 @@ function wp_unregister_sidebar_widget($id) { * @param int|string $id Sidebar ID. * @param string $name Sidebar display name. * @param callable $control_callback Run when sidebar is displayed. - * @param array|string $options Optional. Widget options. See description above. Default empty array. + * @param array $options { + * Optional. Array or string of control options. Default empty array. + * + * @type int $height Never used. Default 200. + * @type int $width Width of the fully expanded control form (but try hard to use the default width). + * Default 250. + * @type int|string $id_base Required for multi-widgets, i.e widgets that allow multiple instances such as the + * text widget. The widget id will end up looking like `{$id_base}-{$unique_number}`. + * } */ function wp_register_widget_control( $id, $name, $control_callback, $options = array() ) { global $wp_registered_widget_controls, $wp_registered_widget_updates, $wp_registered_widgets, $_wp_deprecated_widgets_callbacks;