bp_messages_get_meta( int $message_id, string $meta_key = '', bool $single = true )

Get a piece of message metadata.

Description

See also

  • get_metadata(): for full documentation excluding $meta_type variable.

Parameters

$message_id

(Required) ID of the message to retrieve meta for.

$meta_key

(Optional) Meta key to retrieve.

Default value: ''

$single

(Optional) Whether or not to fetch all or a single value.

Default value: true

Return

(mixed)

Source

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

function bp_messages_get_meta( $message_id, $meta_key = '', $single = true ) {
	add_filter( 'query', 'bp_filter_metaid_column_name' );
	$retval = get_metadata( 'message', $message_id, $meta_key, $single );
	remove_filter( 'query', 'bp_filter_metaid_column_name' );

	return $retval;
}

Changelog

Changelog
Version Description
BuddyPress 2.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.