From 8b83a7351152442d20acf28865f18aa627390b51 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sun, 7 Dec 2014 11:04:23 +0000 Subject: [PATCH] Document the default arguments for `the_widget()` in the hash notation style. Props coffee2code. See #28298. Built from https://develop.svn.wordpress.org/trunk@30770 git-svn-id: http://core.svn.wordpress.org/trunk@30760 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-includes/widgets.php | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index d6316fd91d..9689ec7d2c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-beta2-30769'; +$wp_version = '4.1-beta2-30770'; /** * 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 30ef093d3e..e375bdc785 100644 --- a/wp-includes/widgets.php +++ b/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];