]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-content/themes/twentytwelve/content.php
WordPress 4.0.1-scripts
[autoinstalls/wordpress.git] / wp-content / themes / twentytwelve / content.php
index bf2936ca21ee97713a20615b6e4b76500f2df5a9..56493ed0bdf6026b2e7a18c1089cf95f82f948fa 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 /**
- * The default template for displaying content. Used for both single and index/archive/search.
+ * The default template for displaying content
+ *
+ * Used for both single and index/archive/search.
  *
  * @package WordPress
  * @subpackage Twenty_Twelve
                </div>
                <?php endif; ?>
                <header class="entry-header">
-                       <?php the_post_thumbnail(); ?>
+                       <?php if ( ! post_password_required() && ! is_attachment() ) :
+                               the_post_thumbnail();
+                       endif; ?>
+
                        <?php if ( is_single() ) : ?>
                        <h1 class="entry-title"><?php the_title(); ?></h1>
                        <?php else : ?>
                        <?php if ( is_singular() && get_the_author_meta( 'description' ) && is_multi_author() ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries. ?>
                                <div class="author-info">
                                        <div class="author-avatar">
-                                               <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentytwelve_author_bio_avatar_size', 68 ) ); ?>
+                                               <?php
+                                               /** This filter is documented in author.php */
+                                               $author_bio_avatar_size = apply_filters( 'twentytwelve_author_bio_avatar_size', 68 );
+                                               echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
+                                               ?>
                                        </div><!-- .author-avatar -->
                                        <div class="author-description">
                                                <h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2>