Last active
October 16, 2016 06:02
-
-
Save kish2011/146a3d5136051b133cfb9007b0cf9b31 to your computer and use it in GitHub Desktop.
if you want to use rtmedia for UM
This file contains hidden or 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
//@see http://community.rtcamp.com/t/permalinks-with-ultimate-member/4778 | |
//if you want to use rtmedia for UM | |
add_filter( 'author_link', 'rtmedia_for_um', 10, 3); | |
function rtmedia_for_um($link, $author_id, $author_nicename) { | |
if ( class_exists('UM_API') ) | |
$link = str_replace('author', 'user', $link); | |
// get_author_posts_url: http://yoursite.com/author/user-name/ to http://yoursite.com/user/user-name/ | |
return $link; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment