<?php 
bbp_topic_favorite_link();
?>

		</div><!-- .bbp-topic-content -->

	</li><!-- .bbp-header -->

	<li class="bbp-body">

		<div class="bbp-topic-header">

			<div class="bbp-meta">

				<span class="bbp-topic-post-date"><?php 
bbp_topic_post_date();
?>
</span>

				<a href="<?php 
bbp_topic_permalink();
?>
" class="bbp-topic-permalink">#<?php 
bbp_topic_id();
?>
</a>

				<?php 
do_action('bbp_theme_before_topic_admin_links');
?>
Example #2
0
 /**
  * @covers ::bbp_topic_post_date
  * @covers ::bbp_get_topic_post_date
  */
 public function test_bbp_get_topic_post_date()
 {
     $f = $this->factory->forum->create();
     $now = time();
     $post_date = date('Y-m-d H:i:s', $now - 60 * 60 * 100);
     $t = $this->factory->topic->create(array('post_parent' => $f, 'post_date' => $post_date, 'topic_meta' => array('forum_id' => $f)));
     // Configue our written date time, August 4, 2012 at 2:37 pm.
     $gmt = false;
     $date = get_post_time(get_option('date_format'), $gmt, $t, true);
     $time = get_post_time(get_option('time_format'), $gmt, $t, true);
     $result = sprintf('%1$s at %2$s', $date, $time);
     // Output, string, August 4, 2012 at 2:37 pm.
     $this->expectOutputString($result);
     bbp_topic_post_date($t);
     // String, August 4, 2012 at 2:37 pm.
     $datetime = bbp_get_topic_post_date($t, false, false);
     $this->assertSame($result, $datetime);
     // Humanized string, 4 days, 4 hours ago.
     $datetime = bbp_get_topic_post_date($t, true, false);
     $this->assertSame('4 days, 4 hours ago', $datetime);
     // Humanized string using GMT formatted date, 4 days, 4 hours ago.
     $datetime = bbp_get_topic_post_date($t, true, true);
     $this->assertSame('4 days, 4 hours ago', $datetime);
 }
bbp_topic_class();
?>
>

	<div class="bbp-reply-author">

		<?php 
do_action('bbp_theme_before_topic_author_details');
?>

		<?php 
bbp_topic_author_link(array('sep' => '', 'show_role' => true));
?>

		<div class="bbp-reply-post-date"><?php 
bbp_topic_post_date(bbp_get_topic_id());
?>
</div>

		<div class="bbps-post-count"><?php 
printf(__('Post count: %s', 'corporative'), bbp_get_user_reply_count_raw(bbp_get_reply_author_id()));
?>
</div>

		<?php 
if (bbp_is_user_keymaster()) {
    ?>

			<?php 
    do_action('bbp_theme_before_topic_author_admin_details');
    ?>
    /**
     * Add post date, author post count and author ip to the author element.
     */
    public function add_author_post_date_count_ip()
    {
        ?>
		<div class="bbp-reply-post-date"><?php 
        bbp_topic_post_date(bbp_get_topic_id());
        ?>
</div>
		
		<div class="bbps-post-count"><?php 
        printf(__('Post count: %s', 'Avada'), bbp_get_user_reply_count_raw(bbp_get_reply_author_id()) + bbp_get_user_topic_count_raw(bbp_get_reply_author_id()));
        ?>
</div>		
		
		<?php 
        if (bbp_is_user_keymaster()) {
            ?>

			<?php 
            do_action('bbp_theme_before_topic_author_admin_details');
            ?>

			<div class="bbp-reply-ip fusion-reply-id"><?php 
            bbp_author_ip(bbp_get_topic_id());
            ?>
</div>

			<?php 
            do_action('bbp_theme_after_topic_author_admin_details');
            ?>

		<?php 
        }
    }