add_comment_meta

Advertisement

Summery Summery

Add meta data field to a comment.

Syntax Syntax

add_comment_meta( int $comment_id, string $meta_key, mixed $meta_value, bool $unique = false )

Parameters Parameters

$comment_id

(int) (Required) Comment ID.

$meta_key

(string) (Required) Metadata name.

$meta_value

(mixed) (Required) Metadata value.

$unique

(bool) (Optional) Whether the same key should not be added.

Default value: false

Return Return

(int|bool) Meta ID on success, false on failure.

Source Source

File: wp-includes/comment.php

 *                           Default false.
 * @return int|bool Meta ID on success, false on failure.
 */

Advertisement

Changelog Changelog

Changelog
Version Description
2.9.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.