From debdbd5c6eb9e7bdb1b4b0c2cf5985e939705704 Mon Sep 17 00:00:00 2001 From: Emil Uzelac Date: Tue, 22 Mar 2016 16:42:46 -0500 Subject: [PATCH 1/2] Add widget description I keep seeing authors leave description as-is (empty) and believe that it wouldn't hurt to add something in by default. This is a general description taken from https://github.com/WordPress/twentysixteen/blob/master/functions.php#L150 At the same time it shows good practice how to escape the content and translate the string too. --- functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.php b/functions.php index 2430c3f..6b9cd6a 100644 --- a/functions.php +++ b/functions.php @@ -101,7 +101,7 @@ function _s_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', '_s' ), 'id' => 'sidebar-1', - 'description' => '', + 'description' => esc_html__( 'Add widgets here to appear in your sidebar', '_s' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', From d92026bb8fc772ddb2c2dd350f119ab4752d05bb Mon Sep 17 00:00:00 2001 From: Emil Uzelac Date: Mon, 28 Mar 2016 17:51:13 -0500 Subject: [PATCH 2/2] Update functions.php --- functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.php b/functions.php index 6b9cd6a..415ca92 100644 --- a/functions.php +++ b/functions.php @@ -101,7 +101,7 @@ function _s_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', '_s' ), 'id' => 'sidebar-1', - 'description' => esc_html__( 'Add widgets here to appear in your sidebar', '_s' ), + 'description' => esc_html__( 'Add widgets here.', '_s' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

',