Send message to listing agent thought buddypress
-
Hi,
I wounder where I can put the following code to implement
a message button to send a private message trough
buddypress, rather than a listing agents contact form.
(a message copy to their email is sent anyway by BP)… an if the code gets the listing agent?
/** * Add buddypress message form after agent info */ function bp_custom_get_send_private_message_link($to_id,$subject=false,$message=false) { //if user is not logged, do not prepare the link if ( !is_user_logged_in() ) return false; $compose_url=bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?'; if($to_id) $compose_url.=('r=' . bp_core_get_username( $to_id )); if($subject) $compose_url.=('&subject='.$subject); /*if($message) * $compose_url.=("&content=".$message); */ return wp_nonce_url( $compose_url ) ; } //for auto populating message content add_filter('bp_get_messages_content_value','bp_custom_message_content_value'); function bp_custom_message_content_value($content){ if(!empty ($content)) return $content; $content=$_REQUEST['content']; return $content; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Send message to listing agent thought buddypress’ is closed to new replies.