Skip to content

Instantly share code, notes, and snippets.

@VesterDe
Created July 6, 2018 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VesterDe/f6f2a2c449e84a73f865d43206048440 to your computer and use it in GitHub Desktop.
Save VesterDe/f6f2a2c449e84a73f865d43206048440 to your computer and use it in GitHub Desktop.
add_filter('bp_nouveau_get_members_buttons', function( $buttons, $user_id, $type ){
if(isset($buttons['private_message'])){
$buttons['private_message']['button_attr']['href'] = trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() ) . '/compose?r=' . bp_core_get_username( $user_id );
}
return $buttons;
}, 10, 3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment