Created
August 3, 2011 01:05
-
-
Save sbrajesh/1121663 to your computer and use it in GitHub Desktop.
Show recent Visitor to everyone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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