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
No comments yet... Be the first to leave a reply!