コード例 #1
0
ファイル: bbp-topic-template.php プロジェクト: rmccue/bbPress
/**
 * Output the link to the last reply in a topic
 *
 * @since bbPress (r2464)
 *
 * @param int $topic_id Optional. Topic id
 * @uses bbp_get_topic_last_reply_permalink() To get the topic's last reply link
 */
function bbp_topic_last_reply_permalink($topic_id = 0)
{
    echo bbp_get_topic_last_reply_permalink($topic_id);
}
コード例 #2
0
ファイル: template.php プロジェクト: joeyblake/bbpress
/**
 * Output the link to the last reply in a topic
 *
 * @since 2.0.0 bbPress (r2464)
 *
 * @param int $topic_id Optional. Topic id
 * @uses bbp_get_topic_last_reply_permalink() To get the topic's last reply link
 */
function bbp_topic_last_reply_permalink($topic_id = 0)
{
    echo esc_url(bbp_get_topic_last_reply_permalink($topic_id));
}
コード例 #3
0
ファイル: get-last-thing.php プロジェクト: joeyblake/bbpress
 /**
  * @covers ::bbp_topic_last_reply_permalink
  * @covers ::bbp_get_topic_last_reply_permalink
  */
 public function test_bbp_get_topic_last_reply_permalink()
 {
     if (is_multisite()) {
         $this->markTestSkipped('Skipping URL tests in multiste for now.');
     }
     $f = $this->factory->forum->create();
     $t = $this->factory->topic->create(array('post_parent' => $f, 'topic_meta' => array('forum_id' => $f)));
     $topic_last_reply_permalink = bbp_get_topic_last_reply_permalink($f);
     $this->assertSame(bbp_get_topic_permalink($t), $topic_last_reply_permalink);
     $r = $this->factory->reply->create(array('post_parent' => $t, 'reply_meta' => array('forum_id' => $f, 'topic_id' => $t)));
     $topic_last_reply_permalink = bbp_get_topic_last_reply_permalink($f);
     $this->assertSame(bbp_get_reply_permalink($r), $topic_last_reply_permalink);
 }