Advertisement
Guest User

Untitled

a guest
Sep 11th, 2019
1,623
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1.  
  2. function td_get_post_coauthors(){
  3. global $post;
  4. $home = home_url( '/' );
  5. $td_mod_single = new td_module_single($post);
  6.  
  7. if (td_util::get_option('tds_p_show_author_name') != 'hide') {
  8. //echo $td_mod_single->get_author();
  9. $coauths = get_coauthors();
  10. if (count($coauths) > 1) {
  11. echo '<div class="td-post-author-name multiple-authors"><div class="td-author-by">By</div>';
  12. foreach ($coauths as $key => $coauth) {
  13. echo '<a href="'.$home.'/author/' . $coauth->user_nicename . '">' . $coauth->display_name . '</a>';
  14. }
  15. echo '<div class="td-author-line"> - </div></div>';
  16. } else {
  17. echo $td_mod_single->get_author();
  18. };
  19. }
  20. }
  21.  
  22. function td_get_post_coauthors_box(){
  23. global $post;
  24. $home = home_url( '/' );
  25. $td_mod_single = new td_module_single($post);
  26. if (td_util::get_option('tds_show_author_box') != 'hide') {
  27. $coauths = get_coauthors();
  28. if (count($coauths) > 1) {
  29. echo '<div class="author-box-list">';
  30. foreach ($coauths as $key => $coauth) {
  31. echo '<div class="author-box-wrap"><a href="'.$home.'/author/' . $coauth->user_nicename . '">';
  32. echo get_avatar($coauth->user_email, '96');
  33. echo '</a><div class="desc"><div class="td-author-name vcard author"><span class="fn"><a href="'.$home.'/author/' . $coauth->user_nicename . '">' . $coauth->display_name . '</a></span></div>';
  34. echo '<div class="td-author-description">' . $coauth->description . '</div>';
  35. echo '<div class="td-author-social">';
  36. foreach (td_social_icons::$td_social_icons_array as $td_social_id => $td_social_name) {
  37. $authorMeta = get_the_author_meta($td_social_id, $coauth->ID);
  38. if (!empty($authorMeta)) {
  39. echo td_social_icons::get_icon($authorMeta, $td_social_id, true);
  40. }
  41. }
  42. echo '</div>';
  43. echo '</div><div class="clearfix"></div></div>';
  44. }
  45. echo '</div>';
  46. } else {
  47. echo $td_mod_single->get_author_box();
  48. };
  49. }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement