__( 'Primary Menu', 'sunspot' ), ) ); // This theme allows users to set a custom background. add_theme_support( 'custom-background' ); /** * Add support for featured thumbnail images */ add_theme_support( 'post-thumbnails' ); // We'll be using post thumbnails on the front page, search results and archive pages. // "sunspot-thumbnail-wide" is used when sidebar-1 does not contain widgets. add_image_size( 'sunspot-thumbnail', 260, 160, true ); add_image_size( 'sunspot-thumbnail-wide', 387, 160, true ); } endif; // sunspot_setup add_action( 'after_setup_theme', 'sunspot_setup' ); /** * Register widgetized area and update sidebar with default widgets * * @since Sunspot 1.0 */ function sunspot_widgets_init() { register_sidebar( array( 'name' => __( 'Right Sidebar', 'sunspot' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Left Sidebar', 'sunspot' ), 'description' => __( 'Widgets in this sidebar will not be displayed on small screens.', 'sunspot' ), 'id' => 'sidebar-2', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'sunspot_widgets_init' ); /** * Enqueue scripts and styles */ function sunspot_scripts() { wp_enqueue_style( 'style', get_stylesheet_uri() ); wp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/small-menu.js', array( 'jquery' ), '20120206', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); if ( is_singular() && wp_attachment_is_image( get_post()->ID ) ) wp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' ); } add_action( 'wp_enqueue_scripts', 'sunspot_scripts' ); /** * Register Google Fonts style. * * @since Sunspot 1.0 */ function sunspot_register_fonts() { wp_register_style( 'ubuntu', "https://fonts.googleapis.com/css?family=Ubuntu:400,300", array(), '20120821' ); } add_action( 'init', 'sunspot_register_fonts' ); /** * Enqueue Sunspot Fonts * * @since Sunspot 1.0 */ function sunspot_fonts() { wp_enqueue_style( 'ubuntu' ); } add_action( 'wp_enqueue_scripts', 'sunspot_fonts' ); /** * Enqueue Google fonts style to admin screen for custom header display. * * @since Sunspot 1.0 */ function sunspot_admin_fonts( $hook_suffix ) { if ( 'appearance_page_custom-header' != $hook_suffix ) return; wp_enqueue_style( 'ubuntu' ); } add_action( 'admin_enqueue_scripts', 'sunspot_admin_fonts' ); /** * Implement the Custom Header feature */ require get_template_directory() . '/inc/custom-header.php'; /** * Load Jetpack compatibility file. */ if ( file_exists( get_template_directory() . '/inc/jetpack.php' ) ) require get_template_directory() . '/inc/jetpack.php'; /** * 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/tweaks.php'; /** * Custom Theme Options */ require get_template_directory() . '/inc/theme-options/theme-options.php';