bp_get_send_message_button( array|string $args = '' )
Generate the ‘Message’ button for member profile headers.
Description
Parameters
- $args
-
(array|string) (Optional) All arguments are optional. See BP_Button for complete descriptions.
- 'id'
(string) Default: 'private_message'. - 'component'
(string) Default: 'messages'. - 'must_be_logged_in'
(bool) Default: true. - 'block_self'
(bool) Default: true. - 'wrapper_id'
(string) Default: 'send-private-message'. - 'link_href'
(string) Default: the private message link for the current member in the loop. - 'link_text'
(string) Default: 'Message'. - 'link_class'
(string) Default: 'send-message'.
Default value: ''
- 'id'
Return
(string)
Source
File: bp-messages/bp-messages-template.php
function bp_get_send_message_button( $args = '' ) { $r = bp_parse_args( $args, array( 'id' => 'private_message', 'component' => 'messages', 'must_be_logged_in' => true, 'block_self' => true, 'wrapper_id' => 'send-private-message', 'link_href' => bp_get_send_private_message_link(), 'link_text' => __( 'Message', 'buddyboss' ), 'link_class' => 'send-message', ) ); // Note: 'bp_get_send_message_button' is a legacy filter. Use // 'bp_get_send_message_button_args' instead. See #4536. return apply_filters( 'bp_get_send_message_button', /** * Filters the "Private Message" button for member profile headers. * * @since BuddyPress 1.8.0 * * @param array $value See {@link BP_Button}. */ bp_get_button( apply_filters( 'bp_get_send_message_button_args', $r ) ) ); }
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.