Adds meta data field to a comment.
$comment_idintrequired
$meta_keystringrequired
$meta_valuemixedrequired
$uniquebooloptional
Default:false
function add_comment_meta( $comment_id, $meta_key, $meta_value, $unique = false ) {
return add_metadata( 'comment', $comment_id, $meta_key, $meta_value, $unique );
}
| Version | Description |
|---|---|
| 2.9.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/add_comment_meta