Advertisement
Guest User

bbPress replies switch

a guest
Jan 18th, 2014
453
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.74 KB | None | 0 0
  1. function shmoo_time_switch_if_has_replies() {
  2.     if ( bbp_get_topic_reply_count() ) {
  3.         // topic_author + last_reply_id and his time_ago
  4.         echo "<p>door: ";
  5.         echo bbp_topic_author_link( array( 'type' => 'name' ) );
  6.         echo " <span class=\"last-reply-by\">laatste reactie: ";
  7.         echo bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'type' => 'name' ) );
  8.         echo " <span class=\"time-ago\">";
  9.         echo bbp_topic_freshness_link();
  10.         echo "</span></span></p>";
  11.     }
  12.     else {
  13.         // topic_author and his time_ago
  14.         echo "<p>door: ";
  15.         echo bbp_topic_author_link( array( 'type' => 'name' ) );
  16.         echo "<span class=\"time-ago\"> ";
  17.         echo bbp_topic_post_date( $topic_id = 0, $humanize = true, $gmt = false );
  18.         echo "</span></p>";
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement