Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_source_and_via() {
- $postsettings = get_post_meta($this->post->ID, 'td_post_theme_settings', true);
- $buffy ='';
- //via and source
- if (!empty($postsettings['td_source']) or !empty($postsettings['td_via'])) {
- $via_url = '#';
- $source_url = '#';
- if (!empty($postsettings['td_via_url'])) {
- $via_url = $postsettings['td_via_url'];
- }
- if (!empty($postsettings['td_source_url'])) {
- $source_url = $postsettings['td_source_url'];
- }
- $buffy .= '<div class="td-post-source-via">';
- if (!empty($postsettings['td_via'])) {
- $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>';
- }
- if (!empty($postsettings['td_source'])) {
- $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>';
- }
- $buffy .= '</div>';
- }
- return $buffy;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement