Skip to content

Instantly share code, notes, and snippets.

@modemlooper
Last active August 29, 2015 14:16
Show Gist options
  • Select an option

  • Save modemlooper/c4686c254a32fdb6b07a to your computer and use it in GitHub Desktop.

Select an option

Save modemlooper/c4686c254a32fdb6b07a to your computer and use it in GitHub Desktop.
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