Use short array syntax

This commit is contained in:
Ben Word
2015-01-18 16:45:18 -06:00
parent 747882c85e
commit a903e08b86
13 changed files with 40 additions and 39 deletions

View File

@@ -16,9 +16,9 @@ function setup() {
// Register wp_nav_menu() menus
// http://codex.wordpress.org/Function_Reference/register_nav_menus
register_nav_menus(array(
register_nav_menus([
'primary_navigation' => __('Primary Navigation', 'sage')
));
]);
// Add post thumbnails
// http://codex.wordpress.org/Post_Thumbnails
@@ -28,11 +28,11 @@ function setup() {
// Add post formats
// http://codex.wordpress.org/Post_Formats
add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio'));
add_theme_support('post-formats', ['aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio']);
// Add HTML5 markup for captions
// http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5
add_theme_support('html5', array('caption', 'comment-form', 'comment-list'));
add_theme_support('html5', ['caption', 'comment-form', 'comment-list']);
// Tell the TinyMCE editor to use a custom stylesheet
add_editor_style('/dist/css/editor-style.css');
@@ -43,22 +43,22 @@ add_action('after_setup_theme', __NAMESPACE__ . '\\setup');
* Register sidebars
*/
function widgets_init() {
register_sidebar(array(
register_sidebar([
'name' => __('Primary', 'sage'),
'id' => 'sidebar-primary',
'before_widget' => '<section class="widget %1$s %2$s">',
'after_widget' => '</section>',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
]);
register_sidebar(array(
register_sidebar([
'name' => __('Footer', 'sage'),
'id' => 'sidebar-footer',
'before_widget' => '<section class="widget %1$s %2$s">',
'after_widget' => '</section>',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
]);
}
add_action('widgets_init', __NAMESPACE__ . '\\widgets_init');