Files
sage/lib/init.php

51 lines
1.7 KiB
PHP

<?php
/**
* Roots initial setup and constants
*/
function roots_setup() {
// Make theme available for translation
// Community translations can be found at https://github.com/roots/roots-translations
load_theme_textdomain('roots', get_template_directory() . '/lang');
// Register wp_nav_menu() menus (http://codex.wordpress.org/Function_Reference/register_nav_menus)
register_nav_menus(array(
'primary_navigation' => __('Primary Navigation', 'roots'),
));
// Add post thumbnails (http://codex.wordpress.org/Post_Thumbnails)
add_theme_support('post-thumbnails');
// set_post_thumbnail_size(150, 150, false);
// add_image_size('category-thumb', 300, 9999); // 300px wide (and unlimited height)
// Add post formats (http://codex.wordpress.org/Post_Formats)
// add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat'));
// Tell the TinyMCE editor to use a custom stylesheet
add_editor_style('/assets/css/editor-style.css');
}
add_action('after_setup_theme', 'roots_setup');
/**
* Register sidebars
*/
function roots_widgets_init() {
register_sidebar(array(
'name' => __('Primary', 'roots'),
'id' => 'sidebar-primary',
'before_widget' => '<section class="widget %1$s %2$s">',
'after_widget' => '</section>',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
register_sidebar(array(
'name' => __('Footer', 'roots'),
'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', 'roots_widgets_init');