messages_add_callback_values( string $recipients, string $subject, string $content )

Set messages-related cookies.


Description Description

Saves the ‘bp_messages_send_to’, ‘bp_messages_subject’, and ‘bp_messages_content’ cookies, which are used when setting up the default values on the messages page.


Top ↑

Parameters Parameters

$recipients

(string) (Required) Comma-separated list of recipient usernames.

$subject

(string) (Required) Subject of the message.

$content

(string) (Required) Content of the message.


Source Source

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

function messages_add_callback_values( $recipients, $subject, $content ) {
	@setcookie( 'bp_messages_send_to', $recipients, time() + 60 * 60 * 24, COOKIEPATH, COOKIE_DOMAIN, is_ssl() );
	@setcookie( 'bp_messages_subject', $subject,    time() + 60 * 60 * 24, COOKIEPATH, COOKIE_DOMAIN, is_ssl() );
	@setcookie( 'bp_messages_content', $content,    time() + 60 * 60 * 24, COOKIEPATH, COOKIE_DOMAIN, is_ssl() );
}

Top ↑

User Contributed Notes User Contributed Notes

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