Ejemplo n.º 1
0
/**
 * Output link to the profile edit page of a user
 *
 * @since 2.0.0 bbPress (r2688)
 *
 * @param int $user_id Optional. User id
 * @uses bbp_get_user_profile_edit_link() To get user profile edit link
 */
function bbp_user_profile_edit_link($user_id = 0)
{
    echo bbp_get_user_profile_edit_link($user_id);
}
Ejemplo n.º 2
0
 /**
  * @covers ::bbp_user_profile_edit_link
  * @covers ::bbp_get_user_profile_edit_link
  */
 public function test_bbp_get_user_profile_edit_link()
 {
     $display_name = $this->keymaster_userdata->display_name;
     // Pretty permalinks
     $this->set_permalink_structure('/%postname%/');
     $profile_edit_link = '<a href="http://' . WP_TESTS_DOMAIN . '/forums/users/' . $this->keymaster_userdata->user_nicename . '/edit/" rel="nofollow">' . $display_name . '</a>';
     $user_profile_edit_link = bbp_get_user_profile_edit_link($this->keymaster_id);
     // String.
     $this->assertSame($profile_edit_link, $user_profile_edit_link);
     // Output.
     $this->expectOutputString($profile_edit_link);
     bbp_user_profile_edit_link($this->keymaster_id);
     ob_clean();
     // Ugly permalinks
     $this->set_permalink_structure();
     $profile_edit_link = '<a href="http://' . WP_TESTS_DOMAIN . '/?bbp_user='******'&#038;edit=1" rel="nofollow">' . $display_name . '</a>';
     $user_profile_edit_link = bbp_get_user_profile_edit_link($this->keymaster_id);
     // String.
     $this->assertSame($profile_edit_link, $user_profile_edit_link);
     // Output.
     $this->expectOutputString($profile_edit_link);
     bbp_user_profile_edit_link($this->keymaster_id);
 }