Guest User

Untitled

a guest
Jan 13th, 2021
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. <?php $buffy ="";
  2. $buffy .= '<div class="td-author-social">';
  3. foreach (td_social_icons::$td_social_icons_array as $td_social_id => $td_social_name) {
  4. //echo get_the_author_meta($td_social_id) . '<br>';
  5. $authorMeta = get_the_author_meta($td_social_id);
  6. if (!empty($authorMeta)) {
  7.  
  8. //the theme can use the twitter id instead of the full url. This avoids problems with yoast plugin
  9. if ($td_social_id == 'twitter') {
  10. if(filter_var($authorMeta, FILTER_VALIDATE_URL)){
  11.  
  12. } else {
  13. $authorMeta = str_replace('@', '', $authorMeta);
  14. $authorMeta = 'http://twitter.com/' . $authorMeta;
  15. }
  16. }
  17. $buffy .= td_social_icons::get_icon($authorMeta, $td_social_id, true);
  18. }
  19. }
  20. $buffy .= '</div>';
  21. echo $buffy;
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment