Guest User

Untitled

a guest
Nov 18th, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. function get_next_prev_posts() {
  2. if (!$this->is_single) {
  3. return;
  4. }
  5.  
  6. if (td_util::get_option('tds_show_next_prev') == 'hide') {
  7. return;
  8. }
  9.  
  10. $buffy = '';
  11.  
  12. $next_post = get_next_post();
  13. $prev_post = get_previous_post();
  14.  
  15.  
  16. if (!empty($next_post) or !empty($prev_post)) {
  17. $buffy .= '<div class="wpb_row row-fluid next-prev">';
  18. if (!empty($prev_post)) {
  19. $buffy .= '<a href="' . get_permalink($prev_post->ID) . '">';
  20. $buffy .= '<div class="span6 prev-post">';
  21. $buffy .= '<div><img width="6" class="td-retina" src="' . get_template_directory_uri() .
  22. '/images/icons/similar-left.png" alt=""/>' . __td('Previous article', TD_THEME_NAME) . '</div>';
  23. $buffy .= '</div>';
  24. $buffy .= '</a>';
  25. } else {
  26. $buffy .= '<div class="span6 prev-post">';
  27. $buffy .= '</div>';
  28. }
  29.  
  30. if (!empty($next_post)) {
  31. $buffy .= '<a href="' . get_permalink($next_post->ID) . '">';
  32. $buffy .= '<div class="span6 next-post">';
  33. $buffy .= '<div>' . __td('Next article', TD_THEME_NAME) . '<img width="6" class="td-retina" src="' .
  34. get_template_directory_uri() . '/images/icons/similar-right.png" alt=""/></div>';
  35. $buffy .= '</div>';
  36. $buffy .= '</a>';
  37. }
  38. $buffy .= '</div>'; //end fluid row
  39. }
  40.  
  41. return $buffy;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment