wp/wp-content/themes/twentysixteen/template-parts/biography.php
changeset 7 cf61fcea0001
equal deleted inserted replaced
6:490d5cc509ed 7:cf61fcea0001
       
     1 <?php
       
     2 /**
       
     3  * The template part for displaying an Author biography
       
     4  *
       
     5  * @package WordPress
       
     6  * @subpackage Twenty_Sixteen
       
     7  * @since Twenty Sixteen 1.0
       
     8  */
       
     9 ?>
       
    10 
       
    11 <div class="author-info">
       
    12 	<div class="author-avatar">
       
    13 		<?php
       
    14 		/**
       
    15 		 * Filter the Twenty Sixteen author bio avatar size.
       
    16 		 *
       
    17 		 * @since Twenty Sixteen 1.0
       
    18 		 *
       
    19 		 * @param int $size The avatar height and width size in pixels.
       
    20 		 */
       
    21 		$author_bio_avatar_size = apply_filters( 'twentysixteen_author_bio_avatar_size', 42 );
       
    22 
       
    23 		echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
       
    24 		?>
       
    25 	</div><!-- .author-avatar -->
       
    26 
       
    27 	<div class="author-description">
       
    28 		<h2 class="author-title"><span class="author-heading"><?php _e( 'Author:', 'twentysixteen' ); ?></span> <?php echo get_the_author(); ?></h2>
       
    29 
       
    30 		<p class="author-bio">
       
    31 			<?php the_author_meta( 'description' ); ?>
       
    32 			<a class="author-link" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
       
    33 				<?php printf( __( 'View all posts by %s', 'twentysixteen' ), get_the_author() ); ?>
       
    34 			</a>
       
    35 		</p><!-- .author-bio -->
       
    36 	</div><!-- .author-description -->
       
    37 </div><!-- .author-info -->