Last active
August 29, 2015 14:16
-
-
Save modemlooper/c4686c254a32fdb6b07a to your computer and use it in GitHub Desktop.
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
| function wds_filter_profile_url( $user_id = 0, $user_nicename = false, $user_login = false ) { | |
| //var_dump( $user_nicename ); // this is user id even though it says nicename | |
| // get user login do a str_replace for username? | |
| $username = 'wewewewew'; | |
| $after_domain = bp_core_enable_root_profiles() ? $username : bp_get_members_root_slug() . '/' . $username; | |
| return trailingslashit( bp_get_root_domain() . '/' . $after_domain );; | |
| } | |
| add_filter('bp_core_get_user_domain', 'wds_filter_profile_url', 10, 3); | |
| function wds_filter_displayed_user_id( $user_nicename = '' ) { | |
| // need to get user id here for the diplayed buddypress page | |
| return 1; | |
| } | |
| add_filter( 'bp_core_get_userid_from_nicename', 'wds_filter_displayed_user_id' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment