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

(Required) Comment ID.

$meta_key

(Required) Metadata name.

$meta_value

(Required) Metadata value.

$unique

(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