Advertisements

update_comment_meta

Definition:
function update_comment_meta($comment_id, $meta_key, $meta_value, $prev_value = '') {}

Update comment meta field based on comment ID.
Use the $prev_value parameter to differentiate between meta fields with the same key and comment ID.

Parameters

  • int $comment_id: Comment ID.
  • string $meta_key: Metadata key.
  • mixed $meta_value: Metadata value.
  • mixed $prev_value: Optional. Previous value to check before removing.

Return values

returns:False on failure, true if success.

Source code

function update_comment_meta($comment_id, $meta_key, $meta_value, $prev_value = '') {

	return update_metadata('comment', $comment_id, $meta_key, $meta_value, $prev_value);

}

3167

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: