Created
March 6, 2015 04:31
-
-
Save gMagicScott/0425fa409043ce507acf to your computer and use it in GitHub Desktop.
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
add_filter( 'author_link', 'prefix_adjust_author_link', 10, 3 ); | |
function prefix_adjust_author_link( $link, $author_id, $author_nicename ) { | |
$author_id = intval( $author_id ); // Sanitize | |
$user_info = get_userdata( $author_id ); | |
if ( ! $user_info ) { | |
return $link; | |
} | |
$link = home_url( '/' ) . 'who/' . $user_info->user_login; | |
return trailingslashit( $link ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment