From 0c7e70604d6048eb58cfdace1a4855721b4deff1 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Fri, 5 Dec 2014 03:38:22 +0000 Subject: [PATCH] Document the default arguments for `register_sidebar()` in the hash notation style. Props coffee2code. See #28298. Built from https://develop.svn.wordpress.org/trunk@30745 git-svn-id: http://core.svn.wordpress.org/trunk@30735 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-includes/widgets.php | 45 ++++++++++++++++++++--------------------- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index f6fc062364..9c52efc03d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-beta2-30744'; +$wp_version = '4.1-beta2-30745'; /** * 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 0a8f03643f..aa8f3c26d4 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -689,31 +689,30 @@ function register_sidebars($number = 1, $args = array()) { * If theme support for 'widgets' has not yet been added when this function is * called, it will be automatically enabled through the use of add_theme_support() * - * Arguments passed as a string should be separated by '&': - * - * e.g. 'name=Sidebar&id=my_prefix_sidebar' - * - * The same arguments passed as an array: - * - * array( - * 'name' => 'Sidebar', - * 'id' => 'my_prefix_sidebar', - * ) - * - * Arguments: - * name - The name or title of the sidebar displayed in the admin dashboard. - * id - The unique identifier by which the sidebar will be called. - * before_widget - HTML content that will be prepended to each widget's HTML output - * when assigned to this sidebar. - * after_widget - HTML content that will be appended to each widget's HTML output - * when assigned to this sidebar. - * before_title - HTML content that will be prepended to the sidebar title when displayed. - * after_title - HTML content that will be appended to the sidebar title when displayed. - * * @since 2.2.0 - * @uses $wp_registered_sidebars Stores the new sidebar in this array by sidebar ID. * - * @param string|array $args Arguments for the sidebar being registered. + * @global array $wp_registered_sidebars Stores the new sidebar in this array by sidebar ID. + * + * @param array|string $args { + * Optional. Array or string of arguments for the sidebar being registered. + * + * @type string $name The name or title of the sidebar displayed in the Widgets + * interface. Default 'Sidebar $instance'. + * @type string $id The unique identifier by which the sidebar will be called. + * Default 'sidebar-$instance'. + * @type string $description Description of the sidebar, displayed in the Widgets interface. + * Default empty string. + * @type string $class Extra CSS class to assign to the sidebar in the Widgets interface. + * Default empty. + * @type string $before_widget HTML content to prepend to each widget's HTML output when + * assigned to this sidebar. Default is an opening list item element. + * @type string $after_widget HTML content to append to each widget's HTML output when + * assigned to this sidebar. Default is a closing list item element. + * @type string $before_title HTML content to prepend to the sidebar title when displayed. + * Default is an opening h2 element. + * @type string $after_title HTML content to append to the sidebar title when displayed. + * Default is a closing h2 element. + * } * @return string Sidebar ID added to $wp_registered_sidebars global. */ function register_sidebar($args = array()) {