__( 'Primary Menu', 'wilson' ),
'social' => __( 'Social Links', 'wilson' ),
) );
// Enable support for Post Formats.
add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
// Enable support for HTML5 markup.
add_theme_support( 'html5', array(
'comment-list',
'search-form',
'comment-form',
'gallery',
) );
}
endif; // wilson_setup
add_action( 'after_setup_theme', 'wilson_setup' );
/**
* Register widgetized area and update sidebar with default widgets.
*/
function wilson_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar', 'wilson' ),
'id' => 'sidebar-1',
'description' => __( 'Main sidebar that appears on the left of the site.', 'wilson' ),
'before_widget' => '',
'before_title' => '
',
) );
register_sidebar( array(
'name' => __( 'Footer 1', 'wilson' ),
'id' => 'sidebar-2',
'description' => __( 'Appears in the footer section of the site.', 'wilson' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer 2', 'wilson' ),
'id' => 'sidebar-3',
'description' => __( 'Appears in the footer section of the site.', 'wilson' ),
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'wilson_widgets_init' );
/**
* Enqueue scripts and styles.
*/
function wilson_scripts() {
// Styles
wp_enqueue_style( 'wilson-raleway' );
wp_enqueue_style( 'wilson-latos' );
wp_enqueue_style( 'wilson-style', get_stylesheet_uri() );
wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.4.1' );
// JavaScript
wp_enqueue_script( 'wilson-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );
wp_enqueue_script( 'wilson-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'wilson_scripts' );
/**
* Register Google Fonts
*/
function wilson_google_fonts() {
/* translators: If there are characters in your language that are not supported
by Raleway, translate this to 'off'. Do not translate into your own language. */
if ( 'off' !== _x( 'on', 'Raleway font: on or off', 'wilson' ) ) {
wp_register_style( 'wilson-raleway', "https://fonts.googleapis.com/css?family=Raleway:400,700" );
}
/* translators: If there are characters in your language that are not supported
by Latos, translate this to 'off'. Do not translate into your own language. */
if ( 'off' !== _x( 'on', 'Latos font: on or off', 'wilson' ) ) {
wp_register_style( 'wilson-latos', "https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic&subset=latin,latin-ext" );
}
}
add_action( 'init', 'wilson_google_fonts' );
/**
* Enqueue Google Fonts for custom headers
*/
function wilson_admin_scripts( $hook_suffix ) {
if ( 'appearance_page_custom-header' != $hook_suffix )
return;
wp_enqueue_style( 'wilson-raleway' );
wp_enqueue_style( 'wilson-latos' );
}
add_action( 'admin_enqueue_scripts', 'wilson_admin_scripts' );
/**
* Custom template tags for this theme.
*/
require get_template_directory() . '/inc/template-tags.php';
/**
* Custom functions that act independently of the theme templates.
*/
require get_template_directory() . '/inc/extras.php';
/**
* Customizer additions.
*/
require get_template_directory() . '/inc/customizer.php';
/**
* Load Jetpack compatibility file.
*/
require get_template_directory() . '/inc/jetpack.php';