secret

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
if ( ! function_exists( 'woo_author_box' ) ) {
function woo_author_box() {
global $post;
$author_id=$post->post_author;
?>
<?php
if ( is_singular() ) {
$i = new CoAuthorsIterator();
while($i->iterate()) {
?>
<div id="post-author">
<div class="profile-image">
<?php echo get_avatar( get_the_author_meta('ID'), '80' ); ?>
</div>
<div class="profile-content">
<h4>
<?php printf( esc_attr__( 'About %s', 'woothemes' ), get_the_author('description', $author_id) ); ?></h4>
<?php echo get_the_author_meta( 'description'); ?>
<?php if (is_singular()) : ?>
<div class="profile-link">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'woothemes' ), get_the_author( 'display_name', $author_id ) ); ?>
</a>
</div><!-- #profile-link -->
<?php endif; ?>
</div>
<div class="fix"></div>
</div>
<?php } ?>
<?php
}
else {
global $post;
if ( is_author() )
$author_id = get_queried_object_id();
else
$author_id=$post->post_author;
?>
<div id="post-author">
<div class="profile-image">
<?php echo get_avatar( $author_id, '80' ); ?>
</div>
<div class="profile-content">
<h4>
<?php printf( esc_attr__( 'About %s', 'woothemes' ), get_the_author_meta( 'display_name', $author_id ) ); ?></h4>
<?php echo get_the_author_meta( 'description', $author_id ); ?>
<?php if (is_singular()) : ?>
<div class="profile-link">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID', $author_id ) ); ?>">
<?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'woothemes' ), get_the_author_meta( 'display_name', $author_id ) ); ?>
</a>
</div><!-- #profile-link -->
<?php endif; ?>
</div>
<div class="fix"></div>
</div>
<?php
}
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.