Support » Plugins » Hacks » Custom comment_approved value?

  • We have a situation where a commenter wants us to remove temporarily for now but maybe permenantly his comments on our blog. We understand his request and I’m trying to figure out the best way to do this.

    One thought is to set the field comment_approved to something like “hidden” via phpAdmin.
    As best I can tell valid values for this field now are “0”, “1”,”trash”,”spam”, and “post-trash”.

    What I’m after is for these comments to vanish from normal operations until we decide to re-instate them or delete them later.

    Anyone know if this will cause things to blow up?

    FYI we have 77,000+ active comments with this poster having 1977 of them.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Shouldn’t cause things to blow up if you set to a custom status ? wp should just ignore them ?

    websites often end up with weird data left in their tables after plugins get deactivated – I’m often ‘cleaning up’.

    You could try one and see what happens – show the page it was on etc and the comments page.

    It will probably disappear completely from the admin view and you’d have to retrieve using phpmyadmin

    Your initial thoughts on updating the comment_approved field would be suitable for essentially pushing those comments out of view, both on the front facing side of the site and the administration.

    The downside naturally is that you have no means to set this value via the admin, but from PHPMyAdmin it’s easy enough..

    UPDATE wp_comments SET comment_approved = 'hidden' WHERE user_id = 999

    Where 999 should be the ID of the given user(and wp_ reflects your chosen DB prefix).

    To bring them back into view, do the inverse.

    UPDATE wp_comments SET comment_approved = '1' WHERE user_id = 999 AND comment_approved = 'hidden'

    If you need something in place do this directly from the WordPress admin, you’d likely have to look at writing a custom plugin(but shouldn’t be too hard to wrap into a plugin, given that you’re just updating a single comment field with one of two values).

    I’ve had one comment marked as ‘hidden’ for a few days and haven’t seen any strange results so I’ll go ahead with the mass change in a day or two.

    Thanks for the help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom comment_approved value?’ is closed to new replies.