X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/5aa86a9053fb0fa15846bb60aac2fb8fdfff524a..85ad385665744d9cc3bcd939906309be7268edb3:/wp-admin/includes/widgets.php diff --git a/wp-admin/includes/widgets.php b/wp-admin/includes/widgets.php index aed12360..c574f41f 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' ) ); ?> +

@@ -222,4 +239,3 @@ function wp_widget_control( $sidebar_args ) { echo $sidebar_args['after_widget']; return $sidebar_args; } -