<?php
/**
 * The template for displaying the author box
 *
 * @package WordPress
 * @subpackage Edition
 * @since Edition 1.0
 */

global $post;  // Get current post 

// Get author meta
$author_id 		= get_the_author_meta('ID');
$author_name 	= get_the_author_meta('display_name'); 
$author_url 	= get_the_author_meta('user_url');
$author_links   = tw_social_links( $author_id );

if ( get_the_author_meta( 'description' ) || $author_links ) : ?>
	<div class="authorboxfull">
		<div class="one-fifth avatar-container"> 
			<?php 
				$posts_url = get_author_posts_url($author_id); 

				if ($posts_url) { echo '<a href="' . $posts_url .'" >'; }
				echo get_avatar( $author_id, 96, '', $author_name ); 
				if ($posts_url) { echo '</a>'; } ?>
			<h4>
				<?php tw_author_link('posts'); ?>
			</h4>
		</div>
        <div class="four-fifth text-container column-last">
	        <div class="author-description">
	        	<?php the_author_meta( 'description' ); ?>
	        </div>
	        <?php if ( $author_links ) : ?>
		        <div class="authorsocial">
		            <?php echo wp_kses_post( $author_links ); ?>
		            <div class="clear"></div>
		        </div>
	    	<?php endif; ?>
    	</div>
        <div class="clear"></div>
    </div>
<?php endif;