Add sidebar descriptions to sidebar settings and widget admin screen, props jeremyclarke scribu, fixes #11157
git-svn-id: http://svn.automattic.com/wordpress/trunk@12213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -28,12 +28,17 @@ div.widget-liquid-right {
|
||||
}
|
||||
|
||||
.widget-liquid-right .widget,
|
||||
#wp_inactive_widgets .widget {
|
||||
#wp_inactive_widgets .widget,
|
||||
.widget-liquid-right .sidebar-description {
|
||||
width: 250px;
|
||||
margin: 0 auto 20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.widget-liquid-right .sidebar-description {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#wp_inactive_widgets .widget {
|
||||
margin: 0 10px 20px;
|
||||
float: left;
|
||||
|
||||
@@ -52,18 +52,28 @@ function wp_list_widgets() {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@internal Missing Short Description}}
|
||||
* Show the widgets and their settings for a sidebar.
|
||||
* Used in the the admin widget config screen.
|
||||
*
|
||||
* @since unknown
|
||||
*
|
||||
* @param string $sidebar
|
||||
* @param string $sidebar id slug of the sidebar
|
||||
*/
|
||||
function wp_list_widget_controls( $sidebar ) {
|
||||
add_filter( 'dynamic_sidebar_params', 'wp_list_widget_controls_dynamic_sidebar' );
|
||||
|
||||
echo "\t<div id='$sidebar' class='widgets-sortables'>\n";
|
||||
echo "<div id='$sidebar' class='widgets-sortables'>\n";
|
||||
|
||||
$description = wp_sidebar_description( $sidebar );
|
||||
|
||||
if ( !empty( $description ) ) {
|
||||
echo "<div class='sidebar-description'>\n";
|
||||
echo "\t<p class='description'>$description</p>";
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
dynamic_sidebar( $sidebar );
|
||||
echo "\t</div>\n";
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,6 +37,7 @@ $parent_file = 'themes.php';
|
||||
register_sidebar(array(
|
||||
'name' => __('Inactive Widgets'),
|
||||
'id' => 'wp_inactive_widgets',
|
||||
'description' => '',
|
||||
'before_widget' => '',
|
||||
'after_widget' => '',
|
||||
'before_title' => '',
|
||||
|
||||
Reference in New Issue
Block a user