X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/5aa86a9053fb0fa15846bb60aac2fb8fdfff524a..6c8f14c09105d0afa4c1574215c59b5021040e76:/wp-content/themes/twentyeleven/showcase.php
diff --git a/wp-content/themes/twentyeleven/showcase.php b/wp-content/themes/twentyeleven/showcase.php
index 4f690992..9bc57fc3 100644
--- a/wp-content/themes/twentyeleven/showcase.php
+++ b/wp-content/themes/twentyeleven/showcase.php
@@ -66,7 +66,12 @@ get_header(); ?>
*/
$counter_slider = 0;
- ?>
+ // Compatibility with versions of WordPress prior to 3.4.
+ if ( function_exists( 'get_custom_header' ) )
+ $header_image_width = get_theme_support( 'custom-header', 'width' );
+ else
+ $header_image_width = HEADER_IMAGE_WIDTH;
+ ?>
@@ -89,10 +94,10 @@ get_header(); ?>
$feature_class = 'feature-image small';
// Hang on. Let's check this here image out.
- $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) );
+ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) );
// Is it bigger than or equal to our header?
- if ( $image[1] >= HEADER_IMAGE_WIDTH ) {
+ if ( $image[1] >= $header_image_width ) {
// If bigger, let's add a BIGGER class. It's EXTRA classy now.
$feature_class = 'feature-image large';
}
@@ -107,12 +112,12 @@ get_header(); ?>
* make it a large featured post, otherwise render it small
*/
if ( has_post_thumbnail() ) {
- if ( $image[1] >= HEADER_IMAGE_WIDTH )
+ if ( $image[1] >= $header_image_width )
$thumbnail_size = 'large-feature';
else
$thumbnail_size = 'small-feature';
?>
-
+
@@ -142,7 +147,7 @@ get_header(); ?>
else
$class = '';
?>
-
>
+
>
@@ -191,7 +196,7 @@ get_header(); ?>
while ( $recent->have_posts() ) : $recent->the_post(); ?>
-
+
', __( '1 Reply', 'twentyeleven' ), __( '% Replies', 'twentyeleven' ) ); ?>