bp_get_send_public_message_link

Return the public message link for the displayed user.

Description

(string) bp_get_send_public_message_link(); 

Returns (string)

The public message link for the displayed user.


Usage

  1. if ( !function_exists( 'bp_get_send_public_message_link' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_get_send_public_message_link(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-activity/bp-activity-template.php  
  1. function bp_get_send_public_message_link() { 
  2.  
  3. // No link if not logged in, not looking at someone else's profile. 
  4. if ( ! is_user_logged_in() || ! bp_is_user() || bp_is_my_profile() ) { 
  5. $retval = ''; 
  6. } else { 
  7. $args = array( 'r' => bp_get_displayed_user_mentionname() ); 
  8. $retval = wp_nonce_url( $url ); 
  9.  
  10. /** 
  11. * Filters the public message link for the displayed user. 
  12. * @since 1.2.0 
  13. * @param string $retval The URL for the public message link. 
  14. */