WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] comments "awaiting moderation" (4 posts)

  1. ggsmith
    Member
    Posted 4 years ago #

    even when a new comment is flagged "awaiting moderation", it is still displayed. This is true on 2 different installations using 2 different themes. The only comment plugin I have is Akismet.

    In wp-includes/comment-template.php (dated 2009-12-14) I see
    if ($comment->comment_approved == '0') : ?>
    <?php _e('Your comment is awaiting moderation.') ?>
    then, endif followed by displaying the comment etc. ... regardless of whether it is to wait for moderation.

    what happened to <&php else: ?> [display the comment etc.] ... endif.
    (you get the idea)

    Is the logic somewhere else? ... where we can find the conflict?

    Thank you

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    If you are logged into the site as an admin, you will see all comments. Visitors won't see the unmoderated ones.

  3. ggsmith
    Member
    Posted 4 years ago #

    In all cases, I was logged out. totally. Still, how is that possible since that would require an
    if ( $user_ID ) or ...
    which is not there either. there are no conditions at all.

    I sure would like to know how that might be possible.

    thanks,

  4. ggsmith
    Member
    Posted 4 years ago #

    Gee. I found where lynnhatzius had the same problem (+/-) about 10 days ago. He logged out but the comment still showed up because he had used the same email address before.
    I was logged out but used an email address I had used before - on a previous comment, moments before. Also, he was told "Only the person who left the comment can read it. It's a reassurance that their comment did indeed "take" and is awaiting moderation by the Admin of the blog."
    None of this is mentioned in the comment moderation, DOCS section. That would help.

    I tried it again (from a proxy site), entering a different email, and I saw "held for moderation" with my comment displayed under it, but from anywhere else, it was invisible. Only when I logged in, could I see it, in the "pending" list where it should be. Ah! Finally! "Now I get it".

    To re-state my question "how is it done?"; It would appear that the "if" logic is in the apply_filters() function, ... or more specifically, the call_user_func_array() - from within the apply_filters() function.

    At least, now I understand the logic.
    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic