等待审核消息未显示在 WordPress 4.9.6 中

Awaiting Moderation Message not showing up in WordPress 4.9.6

我正在处理我的评论部分。

我有一个非常基本的习惯Comment_Walker。但它在发表评论后不显示 "Awaiting Moderation" 字符串。

评论已成功发布到后台。我已经勾选了评论必须在后端的设置中手动批准。 一条评论在后台的评论区显示为"pending"。但是发表评论时收不到消息

My Walker 文件(非常基本的简化演示)

<?php
/** Custom Comment Walker Basic */

class Custom_Comment_Walker extends Walker_Comment {

    protected function html5_comment( $comment, $depth, $args ) {

        $tag = ( $args['style'] === 'div' ) ? 'div' : 'li';
        ?>      
        <<?php echo $tag; ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( $this->has_children ? 'has-children col-12 p-0' : 'p-0 col-12 list-unstyled' ); ?>>


        <div>
            <?php echo get_comment_text(); ?>
            <?php if ( '0' == $comment->comment_approved ) : ?>
                Awaiting Moderation
            <?php endif; ?>  
        </div>

        <?php
    }   
}

通过以下方式访问:

<div class="comment-list">
    <?php 
      wp_list_comments( array(
          'walker'        => new Custom_Comment_Walker()
      ) );
    ?>
</div>

我不太明白为什么消息不显示。我在这里监督什么吗?在本地主机上使用最新的 WordPress 4.9.6。在发帖之前,我确实停用了所有激活的插件。我还用不同的帐户和角色对此进行了测试。

显然,解决方案是选中 "Save my name, email, and website in this browser for the next time I comment." 复选框以显示消息。

因此,您必须选中 GDPR 复选框才能使评论和消息在 批准之前出现。

抱歉打扰了。