From 16e46b2a1ef1027764b52a03b465c68fae043299 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sun, 7 Dec 2014 20:13:23 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@30778 git-svn-id: http://core.svn.wordpress.org/trunk@30768 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-includes/widgets.php | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 7d143eff80..955f38b98c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-beta2-30777'; +$wp_version = '4.1-beta2-30778'; /** * 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 2869ce1b2d..e24b1b48bf 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -992,16 +992,19 @@ function wp_unregister_sidebar_widget($id) { * 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}. + * `{$id_base}-{$unique_number}`. * * @since 2.2.0 * - * @param int|string $id Sidebar ID. - * @param string $name Sidebar display name. - * @param callback $control_callback Run when sidebar is displayed. - * @param array|string $options Optional. Widget options. See above long description. + * @todo Document `$options` as a hash notation, re: WP_Widget::__construct() cross-reference. + * @todo `$params` parameter? + * + * @param int|string $id Sidebar ID. + * @param string $name Sidebar display name. + * @param callback $control_callback Run when sidebar is displayed. + * @param array|string $options Optional. Widget options. See description above. Default empty array. */ -function wp_register_widget_control($id, $name, $control_callback, $options = array()) { +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; $id = strtolower($id);