|  | 
 
| 在数据库中插入评论。 
 有效的$commetdata关键字名称包括 'comment_author_IP', 'comment_date', 'comment_date_gmt', 'comment_parent', 'comment_approved', 及'user_id'。
 
 用法
 
 复制代码<?php wp_insert_comment( $commentdata ) ?>
 参数
 $commentdata
 
 (数组)(必需)包含关于评论的信息
 
 默认值:None
 
 返回的值
 (整数)
 
 新的评论的编号
 
 示例
 注释
 用法:$wpdb
 用法:current_time()
 用法:get_gmt_from_date()
 用法:wp_update_comment_count()
 用法:在数据库的comments table中插入一条记录
 
 修改记录
 自2.0.0版本后
 
 源文件
 wp_insert_comment()位于 wp-includes/comment.php中。
 | 
 |