tag. This defaults * to the smallest width of content with a sidebar before the sidebar collapses. * The height is automatically set at a 16:9 ratio unless overridden. * * embed_video_height - Leave empty to automatically set at a 16:9 ratio to the width * post_formats - WordPress extra post formats. i.e. 'aside', 'image', 'video', 'quote', * 'link' * * touch_support - Whether to load touch support for carousels (sliders) * fontawesome - Whether to load font-awesome font set or not * * bootstrap_gradients - Whether to load Bootstrap "theme" CSS for gradients * * navbar_classes - One or more of navbar-default, navbar-inverse, navbar-fixed-top, etc. * * custom_header_location - If 'header', displays the custom header above the navbar. If * 'content-header', displays it below the navbar in place of the colored content- * header section. * * image_keyboard_nav - Whether to load javascript for using the keyboard to navigate image attachment pages * * sample_widgets - Whether to display sample widgets in the footer and page-bottom widet areas. * * sample_footer_menu - Whether to display sample footer menu with Top and Home links * * testimonials - Whether to activate testimonials custom post type if Jetpack plugin is * active * * NOTE: THIS VARIABLE HAS BEEN RENAMED FROM $THEME_OPTIONS. PLEASE UPDATE YOUR CHILD THEMES. */ $xsbf_theme_options = array( //'background_color' => 'f2f2f2', //'content_width' => 1170, //'embed_video_width' => 1170, //'embed_video_height' => null, // i.e. calculate it automatically //'post_formats' => '', //'touch_support' => true, //'fontawesome' => true, //'bootstrap_gradients' => false, 'navbar_classes' => 'navbar-default navbar-fixed-top', 'custom_header_location' => 'content-header', //'image_keyboard_nav' => true, //'sample_widgets' => true, //'sample_footer_menu' => true //'testimonials' => true // requires Jetpack ); /** * Force the site title to display in the navbar and add our custom header images */ add_action( 'after_setup_theme', 'xsbf_pratt_after_setup_theme' ); function xsbf_pratt_after_setup_theme() { // These args will override the ones in the parent theme $args = array( 'header-text' => true, // allow user to set the header text color 'default-text-color' => '16a085', // should match css link color 'default-image' => get_stylesheet_directory_uri() . '/images/headers/city.jpg', 'width' => 1600, 'height' => 900 ); add_theme_support( 'custom-header', $args ); //The %2$s references the child theme directory (ie the stylesheet directory), use // %s to reference the parent directory. register_default_headers( array( 'abstract' => array( 'url' => '%2$s/images/headers/abstract.jpg', 'thumbnail_url' => '%2$s/images/headers/abstract-thumbnail.jpg', 'description' => __( 'Abstract', 'flat-bootstrap' ) ), 'book' => array( 'url' => '%2$s/images/headers/book.jpg', 'thumbnail_url' => '%2$s/images/headers/book-thumbnail.jpg', 'description' => __( 'Book', 'flat-bootstrap' ) ), 'briefcase' => array( 'url' => '%2$s/images/headers/briefcase.jpg', 'thumbnail_url' => '%2$s/images/headers/briefcase-thumbnail.jpg', 'description' => __( 'Briefcase', 'flat-bootstrap' ) ), 'camera' => array( 'url' => '%2$s/images/headers/camera.jpg', 'thumbnail_url' => '%2$s/images/headers/camera-thumbnail.jpg', 'description' => __( 'Camera', 'flat-bootstrap' ) ), 'city' => array( 'url' => '%2$s/images/headers/city.jpg', 'thumbnail_url' => '%2$s/images/headers/city-thumbnail.jpg', 'description' => __( 'City', 'flat-bootstrap' ) ), 'desk' => array( 'url' => '%2$s/images/headers/desk.jpg', 'thumbnail_url' => '%2$s/images/headers/desk-thumbnail.jpg', 'description' => __( 'Desk', 'flat-bootstrap' ) ), 'guitar' => array( 'url' => '%2$s/images/headers/guitar.jpg', 'thumbnail_url' => '%2$s/images/headers/guitar-thumbnail.jpg', 'description' => __( 'Guitar', 'flat-bootstrap' ) ), 'notepad' => array( 'url' => '%2$s/images/headers/notepad.jpg', 'thumbnail_url' => '%2$s/images/headers/notepad-thumbnail.jpg', 'description' => __( 'Notepad', 'flat-bootstrap' ) ), 'skyline' => array( 'url' => '%2$s/images/headers/skyline.jpg', 'thumbnail_url' => '%2$s/images/headers/skyline-thumbnail.jpg', 'description' => __( 'Skyline', 'flat-bootstrap' ) ), ) ); /* // Override parent theme's theme.js with our own. We've added javascript to toggle // displaying the search field in the top nav bar. wp_dequeue_script( 'theme' ); wp_enqueue_script( 'theme', get_stylesheet_directory_uri() . '/js/theme.js', array('jquery'), '20140913', true ); */ } /** * Styles the header image and text displayed on the blog * * This function handles BOTH previewing in the customizer as well as the actual display * of the header in the front-end. This function ONLY needs to handle hiding or displaying * the site title and custom header text color. All other styles are from the front-end * CSS. * * Since Pratt doesn't have a header above the top navbar, we need to reverse the behavoir * of displaying the site title or not. i.e. Put it back to the "normal" way it was * intended to work. * * @see xsbf_custom_header_setup(). */ function xsbf_header_style() { // get_header_textcolor() returns 'blank' if hiding site title and tagline or returns // any hex color value. HEADER_TEXTCOLOR is always the default color. $header_text_color = get_header_textcolor(); // If no custom options for text are set, let's bail if ( HEADER_TEXTCOLOR == $header_text_color AND ! display_header_text() ) { //if ( HEADER_TEXTCOLOR == $header_text_color ) { return; } // If we get this far, we have custom styles. Let's do this. ?> Header admin panel. * * This function is NOT used by the Customizer, just the stand-alone header upload screen. * Since the front-end CSS is not loaded in Admin, all the heading styles need to be * inlined here to match the front-end CSS, including the image, h1, and h2 styles. This * function does NOT need to handle hiding or displaying text as that is handled by core * WordPress. * * @see xsbf_custom_header_setup(). */ function xsbf_admin_header_style() { $header_image = get_header_image(); ?> Header admin panel. * * This callback overrides the default markup displayed there. * * This needs to output the HTML that ties to the inline CSS above to style the custom * header image, site title, and tagline. * * @return void */ function xsbf_admin_header_image() { ?>