bp_get_send_public_message_link()
Return the public message link for the displayed user.
Description
Return
(string) The public message link for the displayed user.
Source
File: bp-activity/bp-activity-template.php
function bp_get_send_public_message_link() { // No link if not logged in, not looking at someone else's profile. if ( ! is_user_logged_in() || ! bp_is_user() || bp_is_my_profile() ) { $retval = ''; } else { $args = array( 'r' => bp_get_displayed_user_mentionname() ); $url = add_query_arg( $args, bp_get_activity_directory_permalink() ); $retval = wp_nonce_url( $url ); } /** * Filters the public message link for the displayed user. * * @since BuddyPress 1.2.0 * * @param string $retval The URL for the public message link. */ return apply_filters( 'bp_get_send_public_message_link', $retval ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.2.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.