Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?php
  2. }
  3. }
  4. }
  5.  
  6. /*-----------------------------------------------------------------------------------*/
  7. /* Author Box */
  8. /*-----------------------------------------------------------------------------------*/
  9.  
  10. if ( ! function_exists( 'woo_author' ) ) {
  11. function woo_author() {
  12. // Author box single post page
  13. if ( is_single() && get_option( 'woo_disable_post_author' ) != 'true' )
  14. add_action( 'woo_post_inside_after', 'woo_author_box', 10 );
  15. // Author box author page
  16. elseif ( is_author() )
  17. add_action( 'woo_loop_before', 'woo_author_box', 10 );
  18. }
  19. }
  20.  
  21. /*-----------------------------------------------------------------------------------*/
  22. /* Single Post Author */
  23. /*-----------------------------------------------------------------------------------*/
  24.  
  25. if ( ! function_exists( 'woo_author_box' ) ) {
  26.  
  27. function woo_author_box() {
  28. global $post;
  29. $author_id=$post->post_author;
  30. ?>
  31.  
  32. <?php
  33. if ( is_singular() ) {
  34. $i = new CoAuthorsIterator();
  35. while($i->iterate()) {
  36. ?>
  37.  
  38. <div id="post-author">
  39. <div class="profile-image">
  40. <?php echo get_avatar( get_the_author_meta('ID'), '80' ); ?>
  41. </div>
  42.  
  43. <div class="profile-content">
  44. <h4>
  45. <?php printf( esc_attr__( 'About %s', 'woothemes' ), get_the_author('description', $author_id) ); ?></h4>
  46. <?php echo get_the_author_meta( 'description'); ?>
  47.  
  48. <?php if (is_singular()) : ?>
  49.  
  50. <div class="profile-link">
  51. <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
  52. <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'woothemes' ), get_the_author( 'display_name', $author_id ) ); ?>
  53. </a>
  54. </div><!-- #profile-link -->
  55.  
  56. <?php endif; ?>
  57.  
  58. </div>
  59. <div class="fix"></div>
  60. </div>
  61.  
  62. <?php } ?>
  63.  
  64. <?php
  65. }
  66.  
  67. else {
  68. global $post;
  69. $author_id=$post->post_author;
  70. ?>
  71.  
  72. <div id="post-author">
  73.  
  74. <div class="profile-image">
  75. <?php echo get_avatar( $author_id, '80' ); ?>
  76. </div>
  77. <div class="profile-content">
  78. <h4>
  79. <?php printf( esc_attr__( 'About %s', 'woothemes' ), get_the_author_meta( 'display_name', $author_id ) ); ?></h4>
  80. <?php echo get_the_author_meta( 'description', $author_id ); ?>
  81.  
  82. <?php if (is_singular()) : ?>
  83.  
  84. <div class="profile-link">
  85. <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID', $author_id ) ); ?>">
  86. <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'woothemes' ), get_the_author_meta( 'display_name', $author_id ) ); ?>
  87. </a>
  88. </div><!-- #profile-link -->
  89. <?php endif; ?>
  90.  
  91. </div>
  92. <div class="fix"></div>
  93. </div>
  94.  
  95. <?php
  96. }
  97. }
  98. }