WordPress函数文档delete_comment_meta()

删除一个评论的meta自定义附加信息 描述 Remove metadata matching criteria…

删除一个评论的meta自定义附加信息

描述

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().

用法

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

参数

$comment_id

(integer) (必填) Comment ID

默认值: None

$meta_key

(string) (必填) Metadata key

默认值: None

$meta_value

(mixed) (可选) Metadata value

默认值: Empty string

返回值

(boolean

False for failure. True for success.

示例

注意

  • 使用到 delete_metadata().

历史

添加于 版本: 2.9.0

源文件

delete_comment_meta() 函数的代码位于 wp-includes/comment.php

  • 原文:http://codex.wordpress.org/Function_Reference/delete_comment_meta
类别:WordPress函数文档

本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。

评论 (0)COMMENT