Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Show recent Visitor to everyone
remove_action("bp_after_member_header","visitors_show_my_recent_visitor");//remove hook
add_action("bp_after_member_header","visitors_show_everyone_recent_visitor");//add custom view
function visitors_show_everyone_recent_visitor(){
global $bp;
$recent_visitors=visitors_get_recent_visitors();
if(empty($recent_visitors))
return;//if no visists yest, do not show at all
$output="<div class='recent-visitors'>
<h5>Recent Visitors</h5>";
foreach($recent_visitors as $visitor){
$output.=visitors_build_visitor_html($visitor);
}
echo $output."</div>";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.