Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function td_get_post_coauthors(){
- global $post;
- $home = home_url( '/' );
- $td_mod_single = new td_module_single($post);
- if (td_util::get_option('tds_p_show_author_name') != 'hide') {
- //echo $td_mod_single->get_author();
- $coauths = get_coauthors();
- if (count($coauths) > 1) {
- echo '<div class="td-post-author-name multiple-authors"><div class="td-author-by">By</div>';
- foreach ($coauths as $key => $coauth) {
- echo '<a href="'.$home.'/author/' . $coauth->user_nicename . '">' . $coauth->display_name . '</a>';
- }
- echo '<div class="td-author-line"> - </div></div>';
- } else {
- echo $td_mod_single->get_author();
- };
- }
- }
- function td_get_post_coauthors_box(){
- global $post;
- $home = home_url( '/' );
- $td_mod_single = new td_module_single($post);
- if (td_util::get_option('tds_show_author_box') != 'hide') {
- $coauths = get_coauthors();
- if (count($coauths) > 1) {
- echo '<div class="author-box-list">';
- foreach ($coauths as $key => $coauth) {
- echo '<div class="author-box-wrap"><a href="'.$home.'/author/' . $coauth->user_nicename . '">';
- echo get_avatar($coauth->user_email, '96');
- 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>';
- echo '<div class="td-author-description">' . $coauth->description . '</div>';
- echo '<div class="td-author-social">';
- foreach (td_social_icons::$td_social_icons_array as $td_social_id => $td_social_name) {
- $authorMeta = get_the_author_meta($td_social_id, $coauth->ID);
- if (!empty($authorMeta)) {
- echo td_social_icons::get_icon($authorMeta, $td_social_id, true);
- }
- }
- echo '</div>';
- echo '</div><div class="clearfix"></div></div>';
- }
- echo '</div>';
- } else {
- echo $td_mod_single->get_author_box();
- };
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement