Skip to content

Instantly share code, notes, and snippets.

@scribu
Created November 3, 2010 12:39
Show Gist options
  • Save scribu/661032 to your computer and use it in GitHub Desktop.
Save scribu/661032 to your computer and use it in GitHub Desktop.
Mingle - Users - Online (example)
<?php
/*
Plugin Name: Mingle - Users - Online (example)
Description: Requires WP-UserOnline to be installed
*/
function mingle_linked_names( $name, $user ) {
if ( !$user->user_id ) {
return $name;
}
$nicename = get_userdata( $user->user_id )->user_nicename;
return "<a href='http://wpmingle.com/$nicename'>$name</a>";
}
add_filter( 'useronline_display_user', 'mingle_linked_names', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment