diff -r 346c88efed21 -r 5e2f62d02dcd wp/wp-admin/includes/widgets.php --- a/wp/wp-admin/includes/widgets.php Mon Jun 08 16:11:51 2015 +0000 +++ b/wp/wp-admin/includes/widgets.php Tue Jun 09 03:35:32 2015 +0200 @@ -12,7 +12,7 @@ * @since 2.5.0 */ function wp_list_widgets() { - global $wp_registered_widgets, $sidebars_widgets, $wp_registered_widget_controls; + global $wp_registered_widgets, $wp_registered_widget_controls; $sort = $wp_registered_widgets; usort( $sort, '_sort_name_callback' ); @@ -63,22 +63,35 @@ * @since 2.5.0 * * @param string $sidebar id slug of the sidebar + * @param string optional $sidebar_name Include the HTML for the sidebar name */ -function wp_list_widget_controls( $sidebar ) { +function wp_list_widget_controls( $sidebar, $sidebar_name = '' ) { add_filter( 'dynamic_sidebar_params', 'wp_list_widget_controls_dynamic_sidebar' ); - echo "
\n"; - $description = wp_sidebar_description( $sidebar ); - if ( !empty( $description ) ) { - echo "\n"; + echo '
'; + + if ( $sidebar_name ) { + ?> + + '; + + if ( ! empty( $description ) ) { + echo '

' . $description . '

'; + } + + echo '
'; + dynamic_sidebar( $sidebar ); - echo "
\n"; + + echo ''; } /** @@ -160,11 +173,14 @@ $query_arg['key'] = $key; } - // We aren't showing a widget control, we're outputting a template for a multi-widget control + /* + * We aren't showing a widget control, we're outputting a template + * for a multi-widget control. + */ if ( isset($sidebar_args['_display']) && 'template' == $sidebar_args['_display'] && $widget_number ) { // number == -1 implies a template where id numbers are replaced by a generic '__i__' $control['params'][0]['number'] = -1; - // with id_base widget id's are constructed like {$id_base}-{$id_number} + // With id_base widget id's are constructed like {$id_base}-{$id_number}. if ( isset($control['id_base']) ) $id_format = $control['id_base'] . '-__i__'; } @@ -189,7 +205,7 @@
-
+