<?php
/*
    Template Name: Authors List
*/
?>
<?php get_header();?>
            <div id="main">
            	<div id="fullContent">
					<div class="singlePost">
                    	<?php if(have_posts()) : while(have_posts()) : the_post('');?>
                    	<div class="article mainBorder">
                        	<div class="articleDetails">
                            	<div class="articleTitle">
                                    <h1><?php the_title(); ?></h1>
                                </div><!--End articleTitle-->
                            </div><!--End Article Details-->
                            <div class="articleContent">
                            	<?php the_content(); ?>
                            </div><!--End ArticleContent-->

                            <ul class="authors-wrap">				
                            <?php
                                $users = get_users('blog_id=1&orderby=post_count&order=DESC');
                                foreach ($users as $user) {	?>
                                <li>
                                    <div class="authorAvatar">
                                        <?php echo get_avatar( get_the_author_meta( 'user_email' , $user->ID ), apply_filters( 'MFW_author_bio_avatar_size', 90 ) ); ?>
                                    </div><!-- #author-avatar -->
                                    <div class="authorDescription">
                                        <h3><a href="<?php echo get_author_posts_url( $user->ID ); ?>"><?php echo $user->display_name ?> </a></h3>
                                        <?php the_author_meta( 'description'  , $user->ID ); ?>
                                    </div><!-- #author-description -->
                                    <div class="authorSocial">
                                        <?php if ( get_the_author_meta( 'url' , $user->ID) ) : ?>
                                        <a class="tooltip" href="<?php the_author_meta( 'url' , $user->ID); ?>" title="<?php echo $user->display_name ?> <?php _e( " 's site", 'lioit' ); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/icon_site.png" alt="" /></a>
                                        <?php endif ?>	
                                        <?php if ( get_the_author_meta( 'twitter' , $user->ID) ) : ?>
                                        <a class="tooltip" href="http://twitter.com/<?php the_author_meta( 'twitter' ); ?>" title="<?php echo $user->display_name ?><?php _e( '  on Twitter', 'lioit' ); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/icon_twitter.png" alt="" /></a>
                                        <?php endif ?>	
                                        <?php if ( get_the_author_meta( 'facebook' , $user->ID) ) : ?>
                                        <a class="tooltip" href="<?php the_author_meta( 'facebook' ); ?>" title="<?php echo $user->display_name ?><?php _e( '  on Facebook', 'lioit' ); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/icon_facebook.png" alt="" /></a>
                                        <?php endif ?>
                                        <?php if ( get_the_author_meta( 'google' , $user->ID) ) : ?>
                                        <a class="tooltip" href="<?php the_author_meta( 'google' ); ?>" title="<?php echo $user->display_name ?><?php _e( '  on Google+', 'lioit' ); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/icon_google.png" alt="" /></a>
                                        <?php endif ?>	
                                        <?php if ( get_the_author_meta( 'linkedin' , $user->ID) ) : ?>
                                        <a class="tooltip" href="<?php the_author_meta( 'linkedin' , $user->ID); ?>" title="<?php echo $user->display_name ?><?php _e( '  on Linkedin', 'lioit' ); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/icon_linkedin.png" alt="" /></a>
                                        <?php endif ?>				
                                        <?php if ( get_the_author_meta( 'flickr' , $user->ID) ) : ?>
                                        <a class="tooltip" href="<?php the_author_meta( 'flickr' , $user->ID); ?>" title="<?php echo $user->display_name ?><?php _e( '  on Flickr', 'lioit' ); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/icon_flickr.png" alt="" /></a>
                                        <?php endif ?>	
                                        <?php if ( get_the_author_meta( 'youtube' , $user->ID) ) : ?>
                                        <a class="tooltip" href="<?php the_author_meta( 'youtube' , $user->ID); ?>" title="<?php echo $user->display_name ?><?php _e( '  on YouTube', 'lioit' ); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/icon_youtube.png" alt="" /></a>
                                        <?php endif ?>
                                        <?php if ( get_the_author_meta( 'pinterest' , $user->ID) ) : ?>
                                        <a class="tooltip" href="<?php the_author_meta( 'pinterest' , $user->ID); ?>" title="<?php echo $user->display_name ?><?php _e( '  on Pinterest', 'lioit' ); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/icon_pinterest.png" alt="" /></a>
                                        <?php endif ?>	
                                    </div>
        
                                    <div class="clear"></div>
                                </li>
                            <?php } ?>
                            </ul>
                        </div><!--End article-->
                        <?php comments_template('', true); ?>
                        <?php endwhile; ?>
						<?php  else:  ?>
                        <?php  endif; ?>
                    </div><!--End ContentBox-->
                </div><!--End Main Content-->
            </div><!--End Main-->
            <?php require Lioit_TM . '/lio.php';?>
        </div><!--End Content-->
<?php get_footer();?>