isFriend()) { echo elgg_view('output/confirmlink', array( 'href' => "action/friends/remove?friend={$vars['entity']->getGUID()}", 'text' => elgg_echo('friend:remove'), 'class' => 'remove_friend' )); } else { echo elgg_view('output/confirmlink', array( 'href' => "action/friends/add?friend={$vars['entity']->getGUID()}", 'text' => elgg_echo('friend:add'), 'class' => 'add_friend' )); }