~canonical-sysadmins/wordpress/3.9.x

« back to all changes in this revision

Viewing changes to wp-admin/includes/widgets.php

  • Committer: Chris Jones
  • Date: 2010-01-19 13:17:33 UTC
  • Revision ID: cmsj@tenshu.net-20100119131733-rf31jv9k1v0xzo2h
[CJ] Import wordpress 2.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
}
53
53
 
54
54
/**
55
 
 * {@internal Missing Short Description}}
 
55
 * Show the widgets and their settings for a sidebar.
 
56
 * Used in the the admin widget config screen.
56
57
 *
57
58
 * @since unknown
58
59
 *
59
 
 * @param string $sidebar
 
60
 * @param string $sidebar id slug of the sidebar
60
61
 */
61
62
function wp_list_widget_controls( $sidebar ) {
62
63
        add_filter( 'dynamic_sidebar_params', 'wp_list_widget_controls_dynamic_sidebar' );
63
64
 
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
 
65
75
        dynamic_sidebar( $sidebar );
66
 
        echo "\t</div>\n";
 
76
        echo "</div>\n";
67
77
}
68
78
 
69
79
/**
180
190
        </div>
181
191
        <input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr($id_format); ?>" />
182
192
        <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']); ?>" />
185
195
        <input type="hidden" name="widget_number" class="widget_number" value="<?php echo esc_attr($widget_number); ?>" />
186
196
        <input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr($multi_number); ?>" />
187
197
        <input type="hidden" name="add_new" class="add_new" value="<?php echo esc_attr($add_new); ?>" />
188
198
 
189
199
        <div class="widget-control-actions">
190
200
                <div class="alignleft">
191
 
                <a class="widget-control-remove" href="#remove"><?php _e('Remove'); ?></a> |
 
201
                <a class="widget-control-remove" href="#remove"><?php _e('Delete'); ?></a> |
192
202
                <a class="widget-control-close" href="#close"><?php _e('Close'); ?></a>
193
203
                </div>
194
204
                <div class="alignright<?php if ( 'noform' === $has_form ) echo ' widget-control-noform'; ?>">