Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 2890376870
Fetching contributors…

Cannot retrieve contributors at this time

104 lines (102 sloc) 5.565 kB
<?php
/**
* Author Template
*
* Displays author page is required to be displayed
*
* @package GroundFloor
* @since 1.0
*
* @link http://buynowshop.com/themes/ground-floor/
* @link https://github.com/Cais/ground-floor/
* @link http://wordpress.org/extend/themes/ground-floor/
*
* @author Edward Caissie <edward.caissie@gmail.com>
* @copyright Copyright (c) 2009-2012, Edward Caissie
*
* Last revised April 16, 2012
* @version 1.9
* Implemented `gf_use_posted`
* Added conditionals to display website (with email) and biography only if information has been entered into the user fields
* Addressed deprecated call to `get_userdatabyloogin`
*/
get_header();
/** Set the $curauth variable */
$curauth = ( get_query_var( 'author_name ' ) ) ? get_user_by( 'id', get_query_var( 'author_name' ) ) : get_userdata( get_query_var( 'author' ) ); ?>
<div id="main-blog">
<div id="content">
<div id="author" class="<?php
/** Add class as related to the user role (see 'Role:' drop-down in User options) */
if ( user_can( $curauth->ID, 'administrator' ) ) {
echo 'administrator';
} elseif ( user_can( $curauth->ID, 'editor' ) ) {
echo 'editor';
} elseif ( user_can( $curauth->ID, 'contributor' ) ) {
echo 'contributor';
} elseif ( user_can( $curauth->ID, 'subscriber' ) ) {
echo 'subscriber';
} else {
echo 'guest';
}
/** Add user classes by ID */
/** First user/administrator */
if ( ( $curauth->ID ) == '1' ) echo ' administrator-prime';
/** Additional Example */
/** elseif ( ( $curauth->ID ) == '2' ) echo ' user-id-2 jellybeen'; */
?>">
<h2><?php _e( 'About ', 'groundfloor' ); ?><?php echo $curauth->display_name; ?></h2>
<ul>
<?php if ( ! empty( $curauth->user_url ) ) { ?>
<li><?php _e( 'Website', 'groundfloor' ); ?>: <a href="<?php echo $curauth->user_url; ?>"><?php echo $curauth->user_url; ?></a> <?php _e('or', 'groundfloor'); ?> <a href="mailto:<?php echo $curauth->user_email; ?>"><?php _e( 'email', 'groundfloor' ); ?></a></li>
<?php
}
if ( ! empty( $curauth->user_description ) ) { ?>
<li><?php _e( 'Biography', 'groundfloor' ); ?>: <?php echo $curauth->user_description; ?></li>
<?php } ?>
</ul>
</div> <!-- #author -->
<h2><?php _e( 'Posts by ', 'groundfloor' ); ?><?php echo $curauth->display_name; ?>:</h2>
<?php /** Start the_Loop */
if ( have_posts() ) :
$count = 0;
while ( have_posts() ) : the_post();
$count++; ?>
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'groundfloor' ); ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<div class="post-details">
<?php printf( __( '%1$s on %2$s', 'groundfloor' ), gf_use_posted(), get_the_time( get_option( 'date_format' ) ) );
if ( ! post_password_required() ) { /** Hide Comment(s) if password required to read post */
echo ' ';
comments_popup_link( __( 'with No Comments', 'groundfloor' ), __( 'with 1 Comment', 'groundfloor' ), __( 'with % Comments', 'groundfloor' ), '', __( '(Comments Closed)', 'groundfloor' ) );
} /** password protected post test */
edit_post_link( __( 'Edit', 'groundfloor' ), __( ' &#124; ', 'groundfloor' ), __( '', 'groundfloor' ) );
_e( '<br />in ', 'groundfloor' );?><?php the_category( ', ' ) ?><br />
<?php the_tags( __( 'as ', 'groundfloor' ), ', ', '' ); ?><br />
</div> <!-- .post-details --> <?php if ( $count == 1 ) :
the_content();
wp_link_pages( array( 'before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number' ) );
else :
the_excerpt();
endif; ?>
<div class="clear"></div> <!-- For inserted media at the end of the post -->
</div> <!-- post_class -->
<?php endwhile; ?>
<div id="nav-global" class="navigation">
<div class="left">
<?php next_posts_link( __( '&laquo; Previous entries ', 'groundfloor' ) ); ?>
</div>
<div class="right">
<?php previous_posts_link( __( ' Next entries &raquo;', 'groundfloor' ) ); ?>
</div>
</div> <!-- .navigation -->
<div class="clear"></div>
<?php else : ?>
<h2><?php printf( __( 'Search Results for: %s', 'groundfloor' ), '<span>' . esc_html( get_search_query() ) . '</span>' ); ?></h2>
<p><?php _e( 'Sorry, there are no posts by this author.', 'groundfloor' ); ?></p>
<?php get_search_form();
endif; ?>
<!-- end the Loop -->
</div> <!-- #content -->
</div> <!-- #main-blog -->
<?php get_sidebar();
get_footer();?>
Jump to Line
Something went wrong with that request. Please try again.