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

Get a piece of message metadata.

Description Description

See also See also

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

Top ↑

Parameters Parameters


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


(string) (Optional) Meta key to retrieve.

Default value: ''


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

Default value: true

Top ↑

Return Return


Top ↑

Source 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;

Top ↑

Changelog Changelog

Version Description
2.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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