Advertisement
Guest User

sdfdsf

a guest
May 15th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. <?php
  2. global $avia_config, $post;
  3.  
  4. $author_id = get_query_var( 'author' );
  5. if(empty($author_id)) $author_id = get_the_author_meta('ID');
  6.  
  7. $name = apply_filters('avf_author_name', get_the_author_meta('display_name', $author_id), $author_id);
  8. $email = apply_filters('avf_author_email', get_the_author_meta('email', $author_id), $author_id);
  9.  
  10. $gravatar_alt = esc_html($name);
  11. $gravatar = get_avatar($email, '81', '', $gravatar_alt);
  12. $name = "<span class='author-box-name' ".avia_markup_helper(array('context' => 'author_name','echo'=>false)).">". $name ."</span>";
  13. $heading = __("About",'avia_framework') ." ". $name;
  14. $description = apply_filters('avf_author_description', get_the_author_meta('description', $author_id), $author_id);
  15.  
  16. echo '<section class="author-box" '.avia_markup_helper(array('context' => 'author','echo'=>false)).'>';
  17. if(empty($description))
  18. {
  19. $description = __("This author has yet to write their bio.",'avia_framework');
  20. $description .= '</br>'.sprintf( __( 'Meanwhile lets just say that we are proud %s contributed a whooping %s entries.', 'avia_framework' ), $name, count_user_posts( $author_id ) );
  21.  
  22. if(current_user_can('edit_users') || get_current_user_id() == $author_id)
  23. {
  24. $description .= "</br><a href='".admin_url( 'profile.php?user_id=' . $author_id )."'>".__( 'Edit the profile description here.', 'avia_framework' )."</a>";
  25. }
  26. }
  27.  
  28. $author_link = get_author_posts_url($post->post_author);
  29. $link = is_single() ? "<a href='{$author_link}' class='post-author-format-type'>{$heading}</a>" : $heading;
  30.  
  31. echo "<span class='post-author-format-type blog-meta'><span class='rounded-container'>{$gravatar}</span></span>";
  32. echo "<div class='author_description '>
  33. <h3 class='author-title'>$link</h3>
  34. <div class='author_description_text'" .avia_markup_helper(array('context' => 'description','echo'=>false)).">".wpautop($description)."</div><span class='author-extra-border'></span></div>";
  35. echo '</section>';
  36. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement