Created
November 3, 2010 12:39
-
-
Save scribu/661032 to your computer and use it in GitHub Desktop.
Mingle - Users - Online (example)
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
<?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