WordPress.org

Codex

Function Reference/delete comment meta

This page is marked as incomplete. You can help Codex by expanding it.

Contents

Description

Remove metadata matching criteria from a comment. You can match based on the key, or key and value. Removing based on key and value will keep from removing duplicate metadata with the same key. It also allows removing all metadata matching key, if needed.

delete_comment_meta() allows you to delete any meta values stored against comments, which have been set using add_comment_meta(). Similar method to delete_post_meta().

Usage

<?php
   delete_comment_meta
$comment_id$meta_key$meta_value );
?>

Parameters

$comment_id
(integer) (required) Comment ID
Default: None
$meta_key
(string) (required) Metadata key
Default: None
$meta_value
(mixed) (optional) Metadata value
Default: None

Return Values

(boolean) 
False for failure. True for success.

Examples

Notes

Change Log

Since: 2.9.0

Source File

delete_comment_meta() is located in wp-includes/comment.php

Related