Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/widgets.php

    r11577 r12284  
    5353
    5454/**
    55  * {@internal Missing Short Description}}
    56  *
    57  * @since unknown
    58  *
    59  * @param string $sidebar
     55 * Show the widgets and their settings for a sidebar.
     56 * Used in the the admin widget config screen.
     57 *
     58 * @since unknown
     59 *
     60 * @param string $sidebar id slug of the sidebar
    6061 */
    6162function wp_list_widget_controls( $sidebar ) {
    6263    add_filter( 'dynamic_sidebar_params', 'wp_list_widget_controls_dynamic_sidebar' );
    6364
    64     echo "\t<div id='$sidebar' class='widgets-sortables'>\n";
     65    echo "<div id='$sidebar' class='widgets-sortables'>\n";
     66
     67    $description = wp_sidebar_description( $sidebar );
     68
     69    if ( !empty( $description ) ) {
     70        echo "<div class='sidebar-description'>\n";
     71        echo "\t<p class='description'>$description</p>";
     72        echo "</div>\n";
     73    }
     74
    6575    dynamic_sidebar( $sidebar );
    66     echo "\t</div>\n";
     76    echo "</div>\n";
    6777}
    6878
     
    181191    <input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr($id_format); ?>" />
    182192    <input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr($id_base); ?>" />
    183     <input type="hidden" name="widget-width" class="widget-width" value="<?php echo esc_attr($control['width']); ?>" />
    184     <input type="hidden" name="widget-height" class="widget-height" value="<?php echo esc_attr($control['height']); ?>" />
     193    <input type="hidden" name="widget-width" class="widget-width" value="<?php if (isset( $control['width'] )) echo esc_attr($control['width']); ?>" />
     194    <input type="hidden" name="widget-height" class="widget-height" value="<?php if (isset( $control['height'] )) echo esc_attr($control['height']); ?>" />
    185195    <input type="hidden" name="widget_number" class="widget_number" value="<?php echo esc_attr($widget_number); ?>" />
    186196    <input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr($multi_number); ?>" />
Note: See TracChangeset for help on using the changeset viewer.