bp_messages_update_meta( int $message_id, string|bool $meta_key, string|bool $meta_value, string $prev_value = '' )

Update a piece of message metadata.

Description Description

See also See also

Top ↑

Parameters Parameters


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


(string|bool) (Required) Meta key to update.


(string|bool) (Required) Meta value to update.


(string) (Optional) If specified, only update existing metadata entries with the specified value. Otherwise, update all entries.

Default value: ''

Top ↑

Return Return


Top ↑

Source Source

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

function bp_messages_update_meta( $message_id, $meta_key, $meta_value, $prev_value = '' ) {
	add_filter( 'query', 'bp_filter_metaid_column_name' );
	$retval = update_metadata( 'message', $message_id, $meta_key, $meta_value, $prev_value );
	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.