X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/80b7979fccf09a75af3f4c111fa27060ae6dbf85..4713a14935b83517997f3c88f808eb41da55033d:/wp-admin/includes/widgets.php?ds=sidebyside diff --git a/wp-admin/includes/widgets.php b/wp-admin/includes/widgets.php index 318cf3f6..0a868151 100644 --- a/wp-admin/includes/widgets.php +++ b/wp-admin/includes/widgets.php @@ -58,27 +58,40 @@ function _sort_name_callback( $a, $b ) { /** * Show the widgets and their settings for a sidebar. - * Used in the the admin widget config screen. + * Used in the admin widget config screen. * * @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 ''; } /** @@ -179,7 +192,11 @@ function wp_widget_control( $sidebar_args ) {
- + + + + +

@@ -207,8 +224,8 @@ function wp_widget_control( $sidebar_args ) {
- - 'widget-' . esc_attr( $id_format ) . '-savewidget' ) ); ?> + 'widget-' . esc_attr( $id_format ) . '-savewidget' ) ); ?> +

@@ -220,5 +237,6 @@ function wp_widget_control( $sidebar_args ) {