Uses
Uses | Description |
---|---|
wp-includes/meta.php: add_metadata() | Adds metadata for the specified object. |
Add meta data field to a comment.
(int) (Required) Comment ID.
(string) (Required) Metadata name.
(mixed) (Required) Metadata value. Must be serializable if non-scalar.
(bool) (Optional) Whether the same key should not be added.
Default value: false
(int|bool) Meta ID on success, false on failure.
File: wp-includes/comment.php
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–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/add_comment_meta