false, 'default-image' => '%s/images/headers/header-egypt.jpg', 'default-text-color' => '000', 'width' => 920, 'height' => 360, 'flex-height' => true, 'admin-head-callback' => '__return_false', 'wp-head-callback' => 'adventurejournal_header_style', ) ) ); register_default_headers( array( 'egypt' => array( 'url' => '%s/images/headers/header-egypt.jpg', 'thumbnail_url' => '%s/images/headers/header-egypt-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Egypt', 'adventurejournal' ) ), 'cart' => array( 'url' => '%s/images/headers/header-cart.jpg', 'thumbnail_url' => '%s/images/headers/header-cart-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Cart', 'adventurejournal' ) ), 'flower' => array( 'url' => '%s/images/headers/header-flower.jpg', 'thumbnail_url' => '%s/images/headers/header-flower-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Flower', 'adventurejournal' ) ), 'hut' => array( 'url' => '%s/images/headers/header-hut.jpg', 'thumbnail_url' => '%s/images/headers/header-hut-thumbnail.jpg', /* translators: header image description */ 'description' => __( 'Hut', 'adventurejournal' ) ) ) ); } add_action( 'after_setup_theme', 'adventurejournal_custom_header_setup' ); /** * Custom Header Styles. * * We need to dynamically adjust the positioning of the * content wrapper when the custom header image is greater * than 360 pixels. * * Hooks into the "wp_head" action via add_theme_support(). * * @package Adventurejournal * @since Adventurejournal 2.1 */ function adventurejournal_header_style() { /** * Don't output Custom Header CSS when the Custom Header * isn't displayed. This is the case for posts and pages * that have a Featured Image that is large enough. */ if ( is_singular() && has_post_thumbnail( get_the_ID() ) && ( $image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'post-thumbnail' ) ) && $image[1] >= 920 ) { return; } $height = (int) get_custom_header()->height; ?>