bp_get_send_public_message_button( array|string $args = '' )
Return button for sending a public message (an @-mention).
Description Description
Parameters Parameters
- $args
-
(Optional) All arguments are optional. See BP_Button for complete descriptions.
- 'id'
(string) Default: 'public_message'. - 'component'
(string) Default: 'activity'. - 'must_be_logged_in'
(bool) Default: true. - 'block_self'
(bool) Default: true. - 'wrapper_id'
(string) Default: 'post-mention'. - 'link_href'
(string) Default: the public message link for the current member in the loop. - 'link_text'
(string) Default: 'Public Message'. - 'link_class'
(string) Default: 'activity-button mention'.
Default value: ''
- 'id'
Return Return
(string) The button for sending a public message.
Source Source
File: bp-activity/bp-activity-template.php
function bp_get_send_public_message_button( $args = '' ) {
$r = bp_parse_args( $args, array(
'id' => 'public_message',
'component' => 'activity',
'must_be_logged_in' => true,
'block_self' => true,
'wrapper_id' => 'post-mention',
'link_href' => bp_get_send_public_message_link(),
'link_text' => __( 'Public Message', 'buddypress' ),
'link_class' => 'activity-button mention'
) );
/**
* Filters the public message button HTML.
*
* @since 1.2.10
*
* @param array $r Array of arguments for the public message button HTML.
*/
return bp_get_button( apply_filters( 'bp_get_send_public_message_button', $r ) );
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.2.0 | Introduced. |