Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • #3827


    I noticed that comments added to existing feature requests are immediately online, and this despite the fact that according to the settings new submissions first get the status “draft” assigned. It also does not to respect the general WP discussion settings, which say that every first comment of a user and all comments with links and certain bad words in them need to be approved before going online.

    Can you please tell me what to do so that these comments will not be published without approval? Otherwise anyone can just publish whatever crap on my website and I don’t even receive a notification.

    Thanks a lot




    I’ll report it to Kriesi


    Thank you for the fast reaction!


    I just noticed that Kriesi was last time online one week ago:

    Where would the reply appear – here in the forum? Or is there any bug tracking system?



    Hey! yould you send me your login details so I can take a look myself? When publishing new feedback the draft function should definitley work. I will have a look if its easy to implement the global comment settings as well but wont make a promise here :)


    Thanks – I sent you a message via contact form. Do you mean that this problem is specific to our website? You cannot reproduce it?

    New feedback arrives as “draft”, that is working correctly. But then the comments are published immediately – that is a problem.


    ah ok, than this was a misunderstanding. if the new feedback is set to draft everything is working as intended. As I said, making the comments behave like set in the global settings is a good idea but was never implemented. So we just neeed to deal with those comments?

    I think I found a quick and dirty solution :)

    Comments are added via wp_insert_comment:

    open index.php in your plugin folder and search at line 302 for :

    $post = array(
    'comment_post_ID'=> $id,
    'comment_author' => $_POST,
    'comment_content' => wpautop(wptexturize($_POST)),
    'comment_author_email' => $_POST,
    'comment_author_IP' => $this->user->ip_adress

    and change it to

    $post = array(
    'comment_post_ID'=> $id,
    'comment_author' => $_POST,
    'comment_content' => wpautop(wptexturize($_POST)),
    'comment_author_email' => $_POST,
    'comment_author_IP' => $this->user->ip_adress,
    'comment_approved' => 0

    There is no documentation about this on the wordpress function but i guess setting the comment_approved to either 0 or -1 should work


    Thank you very much, that did the trick! :-)

    The new comments now show up in the backend where the admin needs to approve.

    I will probably still have to find a way how to show a message to that person who submitted the comment, something like “Thank you, we have received your comment.”


    OK, one more: I needed to receive a notification for every new comment. So I added:

    wp_notify_postauthor( $this->addedCommentID, 'comment' );

    before the following


    (after the place where the code above was added, around line 315).

    Maybe some folks find that useful too.


    One more little change for those who like to improve the handling of spam:

    Using the WP function to check for spam. (applying the blacklists)

    'comment_author_IP' => $this->user->ip_adress,
    'comment_approved' => '0'

    if (!check_comment($post['author'], $post['comment_author_email'], '', $post['comment_content'], $post['comment_author_IP'], '', 'comment')) $post['comment_approved'] = 'spam';

    Notification only if comment is not classified as spam:

    if ($post['comment_approved'] != 'spam') wp_notify_postauthor( $this->addedCommentID, 'comment' );

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Avia Feedback Box: need to moderate comments’ is closed to new replies.