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
This commit is contained in:
Drew Jaynes (DrewAPicture) 2014-12-07 11:03:51 +00:00
parent bf507bd3d0
commit 2f25ec0773
1 changed files with 16 additions and 6 deletions

View File

@ -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 `<div class="widget %s">`, 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 `</div>`.
* @type string $before_title HTML content that will be prepended to the widget's title when displayed.
* Default `<h2 class="widgettitle">`.
* @type string $after_title HTML content that will be appended to the widget's title when displayed.
* Default `</h2>`.
* }
*/
function the_widget( $widget, $instance = array(), $args = array() ) {
global $wp_widget_factory;
$widget_obj = $wp_widget_factory->widgets[$widget];