approve,spam,trash etc. options are not coming on comments in admin panel

I found a way to hijack the comment before it’s attached to its post in the DB. Using the snippet below you can attach every comment to your dummy post. Just change COMMENT_ID to the ID of your dummy post. No hacking of core needed! <?php add_filter(‘preprocess_comment’, ‘akt_hijack_comment’); function akt_hijack_comment($comment) { define(‘AKT_REDIRECT_URL’, $comment[‘comment_post_ID’]); $comment[‘comment_post_ID’] = … Read more

Spams, Scams on WordPress site – what to do?

One of our developer Mr. Ahsan Ullah found a very normal solution to that: He simply Refreshed the Permalink settings and it’s all set. From /wp-admin, going Settings ยป Permalinks, he clicked the Save Changes button. The permalink structure of the whole site was refreshed and the unwanted links were vanished from the site.

Prevent registration except through form

I found a good answer and slightly modified it on a related question . It uses htaccess, and redirects any requests to wp-login.php?action=register. # BLOCK SPAM REGISTRATION REQUESTS (wp-login.php?action=register) <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{THE_REQUEST} ^.*(wp-login.php\?action=register).* [NC] RewriteRule ^(.*)$ http://isoreiki.com/about/account </IfModule> Notes: In the answer I linked to he totally blocked these requests. However I … Read more

Get Commentor IP When Marking Comment As Spam

You are missing 2 parameters in your function report_spam. Also the priority should not be 1. Try the code below. add_action(‘transition_comment_status’, ‘report_spam’, 10, 3); function report_spam($new_status, $old_status, $comment){ if($new_status == ‘spam’){ var_dump($comment->comment_author_IP); die; } } I’ve set die so that you can check and manipulate what you want.