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

See also

Parameters

$message_id

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

$meta_key

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

$meta_value

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

$prev_value

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

Default value: ''

Return

(mixed)

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

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.