X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/699231ae09f7057a4d0000cdf32e50a3df6a04ca..596d585e1dc1eb25bccd3781e37210a4e2504179:/wp-content/themes/twentyten/header.php diff --git a/wp-content/themes/twentyten/header.php b/wp-content/themes/twentyten/header.php index fbd24860..50cb3758 100644 --- a/wp-content/themes/twentyten/header.php +++ b/wp-content/themes/twentyten/header.php @@ -15,11 +15,23 @@ <?php /* * Print the <title> tag based on what is being viewed. - * We filter the output of wp_title() a bit -- see - * twentyten_filter_wp_title() in functions.php. */ + global $page, $paged; + wp_title( '|', true, 'right' ); + // Add the blog name. + bloginfo( 'name' ); + + // Add the blog description for the home/front page. + $site_description = get_bloginfo( 'description', 'display' ); + if ( $site_description && ( is_home() || is_front_page() ) ) + echo " | $site_description"; + + // Add a page number if necessary: + if ( $paged >= 2 || $page >= 2 ) + echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) ); + ?> @@ -54,22 +66,40 @@
ID ) && ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) && - $image[1] >= HEADER_IMAGE_WIDTH ) : + $image[1] >= $header_image_width ) : // Houston, we have a new header image! - echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); - else : ?> - + echo get_the_post_thumbnail( $post->ID ); + elseif ( get_header_image() ) : + // Compatibility with versions of WordPress prior to 3.4. + 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; + } + ?> +