bp_get_send_message_button( array|string $args = '' )

Generate the ‘Private Message’ button for member profile headers.


Parameters 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: 'Private Message'.
  • 'link_class'
    (string) Default: 'send-message'.

Default value: ''


Top ↑

Return Return

(string)


Source 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'         => __( 'Private Message', 'buddypress' ),
			'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 1.8.0
			 *
			 * @param array $value See {@link BP_Button}.
			 */
			bp_get_button( apply_filters( 'bp_get_send_message_button_args', $r ) )
		);
	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Added $args parameter.
1.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.