'', 'random-default' => true, 'width' => apply_filters( 'canyon_header_image_width', 940 ), 'height' => apply_filters( 'canyon_header_image_height', 200 ), 'flex-height' => true, 'default-text-color' => 'fff', 'header-text' => true, 'wp-head-callback' => 'canyon_header_style', 'admin-head-callback' => 'canyon_admin_header_style', 'admin-preview-callback' => 'canyon_admin_header_image' ); /** This is all for compatibility with versions of WordPress prior to 3.4. */ if ( function_exists( 'get_custom_header' ) ) { add_theme_support( 'custom-header', $custom_header_support ); } else { define( 'HEADER_TEXTCOLOR', $custom_header_support['default-text-color'] ); define( 'HEADER_IMAGE', $custom_header_support['default-image'] ); define( 'HEADER_IMAGE_WIDTH', $custom_header_support['width'] ); define( 'HEADER_IMAGE_HEIGHT', $custom_header_support['height'] ); define( 'NO_HEADER_TEXT', false ); /** Turn on random header image rotation by default. */ add_theme_support( 'custom-header', array( 'random-default' => $custom_header_support['random-default'] ) ); add_custom_image_header( $custom_header_support['wp-head-callback'], $custom_header_support['admin-head-callback'], $custom_header_support['admin-preview-callback'] ); } /** Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. */ register_default_headers( array( 'fibre' => array( 'url' => '%s/images/headers/header-fibre.png', 'thumbnail_url' => '%s/images/headers/header-fibre-thumb.png', 'description' => 'Fibre' ), 'argyle' => array( 'url' => '%s/images/headers/header-argyle.png', 'thumbnail_url' => '%s/images/headers/header-argyle-thumb.png', 'description' => 'Argyle' ), 'brick' => array( 'url' => '%s/images/headers/header-brick.png', 'thumbnail_url' => '%s/images/headers/header-brick-thumb.png', 'description' => 'Brick' ), ) ); /** Styles the header image and text displayed on the blog / blog preview in admin. */ function canyon_header_style() { $header_textcolor = get_header_textcolor(); if( ( !empty( $header_textcolor ) && $header_textcolor != 'blank' ) || get_header_image() ): canyon_admin_header_style(); endif; } /** Styles the header image displayed on the Appearance > Header admin panel. */ function canyon_admin_header_style() { if ( function_exists( 'get_custom_header' ) ) { $header_image_width = get_custom_header()->width; $header_image_height = get_custom_header()->height; } else { $header_image_width = HEADER_IMAGE_WIDTH; $header_image_height = HEADER_IMAGE_HEIGHT; } ?> Header admin panel. */ function canyon_admin_header_image() { ?>
width; $header_image_height = get_custom_header()->height; } else { $header_image_width = HEADER_IMAGE_WIDTH; $header_image_height = HEADER_IMAGE_HEIGHT; } ?>
<?php bloginfo( 'name' ); ?>