diff --git a/src/wp-includes/widgets.php b/src/wp-includes/widgets.php index 3aca6278c0c16..e45fa772e0abe 100644 --- a/src/wp-includes/widgets.php +++ b/src/wp-includes/widgets.php @@ -225,22 +225,28 @@ function register_sidebars( $number = 1, $args = array() ) { * @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. + * @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. + * @type string $before_sidebar HTML content to prepend to the sidebar. + * Outputs after the dynamic_sidebar_before action. + * Default is an empty string. + * @type string $after_sidebar HTML content to append to the sidebar when displayed. + * Outputs before the dynamic_sidebar_after action. + * Default is an empty string. * } * @return string Sidebar ID added to $wp_registered_sidebars global. */ @@ -253,14 +259,16 @@ function register_sidebar( $args = array() ) { $defaults = array( /* translators: %d: Sidebar number. */ - 'name' => sprintf( __( 'Sidebar %d' ), $i ), - 'id' => "sidebar-$i", - 'description' => '', - 'class' => '', - 'before_widget' => '