From 2f25ec077348a5aa446081aeeaeaa1daf0520995 Mon Sep 17 00:00:00 2001 From: "Drew Jaynes (DrewAPicture)" Date: Sun, 7 Dec 2014 11:03:51 +0000 Subject: [PATCH] Document the default arguments for `the_widget()` in the hash notation style. Props coffee2code. See #28298. git-svn-id: https://develop.svn.wordpress.org/trunk@30770 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/widgets.php | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/widgets.php b/src/wp-includes/widgets.php index 30ef093d3e..e375bdc785 100644 --- a/src/wp-includes/widgets.php +++ b/src/wp-includes/widgets.php @@ -1445,12 +1445,22 @@ function wp_convert_widget_settings($base_name, $option_name, $settings) { * * @since 2.8.0 * - * @param string $widget the widget's PHP class name (see default-widgets.php) - * @param array $instance the widget's instance settings - * @param array $args the widget's sidebar args - * @return void - **/ -function the_widget($widget, $instance = array(), $args = array()) { + * @param string $widget The widget's PHP class name (see default-widgets.php). + * @param array $instance Optional. The widget's instance settings. Default empty array. + * @param array $args { + * Optional. Array of arguments to configure the display of the widget. + * + * @type string $before_widget HTML content that will be prepended to the widget's HTML output. + * Default `
`, where `%s` is the widget's class name. + * @type string $after_widget HTML content that will be appended to the widget's HTML output. + * Default `
`. + * @type string $before_title HTML content that will be prepended to the widget's title when displayed. + * Default `

`. + * @type string $after_title HTML content that will be appended to the widget's title when displayed. + * Default `

`. + * } + */ +function the_widget( $widget, $instance = array(), $args = array() ) { global $wp_widget_factory; $widget_obj = $wp_widget_factory->widgets[$widget];