Beispiel #1
0
/**
 * Output the title of the forum a topic belongs to
 *
 * @since 2.0.0 bbPress (r2485)
 *
 * @param int $topic_id Optional. Topic id
 * @uses bbp_get_topic_forum_title() To get the topic's forum title
 */
function bbp_topic_forum_title($topic_id = 0)
{
    echo bbp_get_topic_forum_title($topic_id);
}
Beispiel #2
0
 /**
  * @covers ::bbp_topic_forum_title
  * @covers ::bbp_get_topic_forum_title
  */
 public function test_bbp_get_topic_forum_title()
 {
     $f = $this->factory->forum->create();
     $t = $this->factory->topic->create(array('post_parent' => $f, 'topic_meta' => array('forum_id' => $f)));
     $topic_forum_title = bbp_get_topic_forum_title($t);
     $this->assertSame(bbp_get_forum_title($f), $topic_forum_title);
 }