true ) ); /** Add a way for the custom header to be styled in the admin panel that controls */ add_custom_image_header( 'canyon_header_style', 'canyon_admin_header_style' ); /** 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 */ function canyon_header_style() { $headimg = sprintf( '#headimg { border: none; background: url(%s) no-repeat; font-family: Georgia, Times, serif; width: %spx; height: %spx; text-align: center; text-shadow: #8e8e8e 1px 1px; }', get_header_image(), HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT ); $h1 = sprintf( '#headimg h1, #headimg h1 a { margin:0 0 15px 0; padding-top:65px; color: #%s; font-size: 36px; font-weight: normal; text-decoration: none; }', esc_html( get_header_textcolor() ) ); $desc = sprintf( '#headimg #desc { margin:0px; padding-top:5px; color: #%s; font-size: 18px; font-style: italic; }', esc_html( get_header_textcolor() ) ); printf( '', $headimg, $h1, $desc ); } /** Styles the header image displayed on the Appearance > Header admin panel. */ function canyon_admin_header_style() { $headimg = sprintf( '.appearance_page_custom-header #headimg { border: none; background: url(%s) no-repeat; font-family: Georgia, Times, serif; width: %spx; height: %spx; text-align: center; text-shadow: #8e8e8e 1px 1px; }', get_header_image(), HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT ); $h1 = sprintf( '#headimg h1, #headimg h1 a { margin:0px; padding-top:65px; color: #%s; font-size: 36px; font-weight: normal; text-decoration: none; }', esc_html( get_header_textcolor() ) ); $desc = sprintf( '#headimg #desc { margin:0px; padding-top:25px; color: #%s; font-size: 18px; font-style: italic; }', esc_html( get_header_textcolor() ) ); printf( '', $headimg, $h1, $desc ); } ?>