forked from mirror/_s
_s: Encourage the use of sidebar descriptions.
Sidebar descriptions provide an opportunity to provide context about where the sidebar is located or when it is loaded. We should encourage theme developers to use them, similar to how we hint default images for custom headers and backgrounds. The callback’s outdated documentation describes the function in an early state of Toolbox (introduced in r3678-wpcom-themes), the earliest public record would be https://themes.trac.wordpress.org/browser/toolbox/0.3/functions.php#L99 This is as good an opportunity to update it as any. Props @emiluzelac for initial patch. Fixes #433.
This commit is contained in:
parent
796d8e8c7e
commit
32350a8103
|
@ -66,12 +66,15 @@ endif; // _s_setup
|
||||||
add_action( 'after_setup_theme', '_s_setup' );
|
add_action( 'after_setup_theme', '_s_setup' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register widgetized area and update sidebar with default widgets.
|
* Register widget area.
|
||||||
|
*
|
||||||
|
* @link http://codex.wordpress.org/Function_Reference/register_sidebar
|
||||||
*/
|
*/
|
||||||
function _s_widgets_init() {
|
function _s_widgets_init() {
|
||||||
register_sidebar( array(
|
register_sidebar( array(
|
||||||
'name' => __( 'Sidebar', '_s' ),
|
'name' => __( 'Sidebar', '_s' ),
|
||||||
'id' => 'sidebar-1',
|
'id' => 'sidebar-1',
|
||||||
|
'description' => '',
|
||||||
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
|
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
|
||||||
'after_widget' => '</aside>',
|
'after_widget' => '</aside>',
|
||||||
'before_title' => '<h1 class="widget-title">',
|
'before_title' => '<h1 class="widget-title">',
|
||||||
|
|
Reference in New Issue