__( 'Primary Menu', 'capoverso' ),
'home' => __( 'Home Page Menu', 'capoverso' ),
) );
/*
* Enable support for Post Thumbnails on posts and pages.
*/
add_theme_support( 'post-thumbnails' );
add_image_size( 'capoverso-home', '2000', '9999', false );
add_image_size( 'capoverso-site-logo', '510', '510' );
add_theme_support( 'html5', array(
'search-form', 'comment-form', 'comment-list', 'gallery', 'caption',
) );
/**
* Enable support for Post Formats
*/
add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
/**
* Setup the WordPress core custom background feature.
*/
add_theme_support( 'custom-background', apply_filters( 'capoverso_custom_background_args', array(
'default-color' => 'd8d8d8',
'default-image' => get_template_directory_uri() . '/img/capoverso-default-background2x.png',
) ) );
}
endif; // capoverso_setup
add_action( 'after_setup_theme', 'capoverso_setup' );
/**
* Register widgetized area and update sidebar with default widgets
*/
function capoverso_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar', 'capoverso' ),
'id' => 'sidebar-1',
'before_widget' => '',
'before_title' => '
',
) );
register_sidebar( array(
'name' => __( 'Footer Widgets', 'capoverso' ),
'id' => 'sidebar-footer',
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'capoverso_widgets_init' );
/**
* Enqueue scripts and styles
*/
function capoverso_scripts() {
wp_enqueue_style( 'capoverso-style', get_stylesheet_uri() );
wp_enqueue_script( 'capoverso-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' );
}
wp_enqueue_style( 'genericons', get_template_directory_uri() . '/fonts/genericons.css', array(), '3.3.0' );
if ( is_singular() && wp_attachment_is_image() ) {
wp_enqueue_script( 'capoverso-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );
}
}
add_action( 'wp_enqueue_scripts', 'capoverso_scripts', 1 );
/* Set the background image for the home-page.php template
* based on the page's Featured Image,
* overriding any user-defined Custom Background.
*/
function capoverso_home_styles() {
if ( ! has_post_thumbnail() )
return;
$thumb = wp_get_attachment_url( get_post_thumbnail_id(), 'capoverso-home' );
if ( ! empty( $thumb ) ) : ?>