bp_get_send_message_button( array|string $args = '' )

Generate the ‘Message’ button for member profile headers.

Description

Parameters

$args

(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: ''

Return

(string)

Source

File: bp-messages/bp-messages-template.php

1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
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

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.