function bp_blog_latest_post() { echo bp_get_blog_latest_post(); }
/** * Output the latest post from the current blog in the loop. * * @param array $args See {@link bp_get_blog_latest_post()}. */ function bp_blog_latest_post($args = array()) { echo bp_get_blog_latest_post($args); }
/** * @group bp_get_blog_latest_post */ public function test_bp_get_blog_latest_post_latest_format_false() { // Fake the global global $blogs_template; $blogs_template = new stdClass(); $blogs_template->blog = new stdClass(); $blogs_template->blog->latest_post = new stdClass(); $blogs_template->blog->latest_post->guid = 'foo'; $blogs_template->blog->latest_post->post_title = 'bar'; $this->assertSame('<a href="foo">bar</a>', bp_get_blog_latest_post(array('latest_format' => false))); $blogs_template->blog = null; }