From 02f8434c285553ec9b7e9de3df7f6f7ded0f96d4 Mon Sep 17 00:00:00 2001 From: "Drew Jaynes (DrewAPicture)" Date: Sun, 7 Dec 2014 20:12:50 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@30778 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/widgets.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/widgets.php b/src/wp-includes/widgets.php index 2869ce1b2d..e24b1b48bf 100644 --- a/src/wp-includes/widgets.php +++ b/src/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);