tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails */ add_theme_support( 'post-thumbnails' ); add_image_size( 'singular-header', 1600 ); add_image_size( 'grid-thumb', 491, 491, true ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => esc_html__( 'Primary Menu', 'bravado' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'comment-form', 'comment-list', 'gallery', 'caption', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'bravado_custom_background_args', array( 'default-color' => 'fbfbfb', 'default-image' => '', ) ) ); // Add theme support for selective refresh for widgets. add_theme_support( 'customize-selective-refresh-widgets' ); // Set up the WordPress core custom logo feature. add_theme_support( 'custom-logo', array( 'height' => 78, 'width' => 78, 'flex-width' => true, ) ); } endif; // bravado_setup add_action( 'after_setup_theme', 'bravado_setup' ); /** * Register widget area. * * @link http://codex.wordpress.org/Function_Reference/register_sidebar */ function bravado_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'bravado' ), 'id' => 'sidebar-1', 'description' => '', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'bravado_widgets_init' ); /** * Enqueue scripts and styles. */ function bravado_scripts() { wp_enqueue_style( 'bravado-style', get_stylesheet_uri() ); wp_enqueue_style( 'bravado-fonts', bravado_fonts_url(), array(), null ); wp_enqueue_style( 'font-awesome', get_template_directory_uri() . '/fonts/font-awesome.css', array(), '4.5.0' ); wp_enqueue_script( 'bravado-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true ); wp_enqueue_script( 'bravado-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true ); wp_enqueue_script( 'dotdotdot', get_template_directory_uri() . '/js/jquery.dotdotdot.js', array( 'jquery' ), '20150615', true ); wp_enqueue_script( 'bravado-main', get_template_directory_uri() . '/js/bravado.js', array(), '20150615', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'bravado_scripts' ); /** * Register Google Fonts */ function bravado_fonts_url() { $fonts_url = ''; /* Translators: If there are characters in your language that are not * supported by PT Mono, translate this to 'off'. Do not translate * into your own language. */ $pt_mono = esc_html_x( 'on', 'PT Mono font: on or off', 'bravado' ); /* Translators: If there are characters in your language that are not * supported by Merriweather, translate this to 'off'. Do not translate * into your own language. */ $merriweather = esc_html_x( 'on', 'Merriweather font: on or off', 'bravado' ); /* 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. */ $raleway = esc_html_x( 'on', 'Raleway font: on or off', 'bravado' ); if ( 'off' !== $pt_mono && 'off' !== $merriweather && 'off' !== $raleway ) { $font_families = array(); if ( 'off' !== $pt_mono ) { $font_families[] = 'PT Mono'; } if ( 'off' !== $merriweather ) { $font_families[] = 'Merriweather:300,400,400italic,700'; } if ( 'off' !== $raleway ) { $font_families[] = 'Raleway:300'; } $query_args = array( 'family' => urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); } return esc_url_raw( $fonts_url ); } /** * 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';