问题描述
我想知道如何在 wp 评论部分添加一个新的“标志”,以便像批准评论一样,我可以将评论标记为“已拒绝”并触发以下功能
function filter_text( $comment_text,$comment = null ) {
// Do something to the comment,possibly switching based on the presence of $comment
$comment_text = 'This comment was rejected for violations of our TOS';
return $comment_text;
}
add_filter( 'comment_text','filter_text',10,2 );
我希望评论内容不会在后端被更改,但用户会看到他们发布的评论、姓名、日期等,但其中的内容现在显示被拒绝的评论文本。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)