Advertisement
Guest User

Untitled

a guest
Feb 10th, 2017
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. function get_source_and_via() {
  2. $postsettings = get_post_meta($this->post->ID, 'td_post_theme_settings', true);
  3.  
  4. $buffy ='';
  5.  
  6. //via and source
  7. if (!empty($postsettings['td_source']) or !empty($postsettings['td_via'])) {
  8. $via_url = '#';
  9. $source_url = '#';
  10.  
  11.  
  12. if (!empty($postsettings['td_via_url'])) {
  13. $via_url = $postsettings['td_via_url'];
  14. }
  15.  
  16. if (!empty($postsettings['td_source_url'])) {
  17. $source_url = $postsettings['td_source_url'];
  18. }
  19.  
  20. $buffy .= '<div class="td-post-source-via">';
  21. if (!empty($postsettings['td_via'])) {
  22. $buffy .= '<div class="td-post-small-box"><span>' . __td('VIA', TD_THEME_NAME) . '</span><a rel="nofollow" href="' . esc_url($via_url) . '">' . $postsettings['td_via'] . '</a></div>';
  23. }
  24.  
  25. if (!empty($postsettings['td_source'])) {
  26. $buffy .= '<div class="td-post-small-box"><span>' . __td('SOURCE', TD_THEME_NAME) . '</span><a rel="nofollow" href="' . esc_url($source_url) . '">' . $postsettings['td_source'] . '</a></div>';
  27. }
  28. $buffy .= '</div>';
  29. }
  30.  
  31.  
  32. return $buffy;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement