Can the Akismet API key be pulled from the plugin?

After reading several articles, discussing with the community, diving through the Akismet documentation and reviewing their plugin I’ve found if you want test to see if the plugin is active or deactivate you can use: if (function_exists(‘akismet_verify_key’)) : echo “true”; else : echo “false”; endif; After activating the plugin and entering the API key in … Read more

Akismet plugin is deleting spam despite preferences

I would generally not recommend modifying files for Plugins that you do not control. Better would be to write your own site/custom Plugin, to control this hook: add_action(‘akismet_scheduled_delete’, ‘akismet_delete_old’); First, to stop the deletion altogether, simply call: remove_action(‘akismet_scheduled_delete’, ‘akismet_delete_old’); Then, you can set up a cron job (or similar), to fire the akismet_delete_old() function on … Read more

Does Akismet plugin expose any hooks, functions, class that can work with custom code?

I greped a slightly aging copy of the Akismet plugin and these are the hooks I found– filters first, then actions. admin.php:374: if ( apply_filters( ‘akismet_show_user_comments_approved’, get_option(‘akismet_show_user_comments_approved’) ) == ‘true’ ) { akismet.php:144: $akismet_ua = apply_filters( ‘akismet_ua’, $akismet_ua ); akismet.php:201: if ( $incr = apply_filters(‘akismet_spam_count_incr’, 1) ) akismet.php:336: $akismet_nonce_option = apply_filters( ‘akismet_comment_nonce’, get_option( ‘akismet_comment_nonce’ ) … Read more

Check spam in custom form – akismet

The problem is the globals global $akismet_api_host, $akismet_api_port; are not available everywhere. I suggest calling your function in the “init” hook… add_action(‘init’, ‘myAkismetInit’); function myAkismetInit() { var_dump ( bm_checkSpam(”) ); } Check out the Akismet API documentation. The other option is to use one of these wrapper classes: https://github.com/tijsverkoyen/Akismet use \TijsVerkoyen\Akismet\Akismet; // create instance $akismet … Read more

Why do I get email notifications about comments that WordPress has already determined are spam?

Disclaimer: I wrote parts of the Akismet WordPress plugin, though not the parts in question here. Is Akismet failing to connect to the Akismet service, notifying me, and retrying later? Yes, this is exactly what happens. If Akismet doesn’t get a valid response from the servers, it reschedules the check for 20 minutes in the … Read more

How to spam-filter a custom content type with the Akismet plugin?

Akismet – libraries: First I want to mention that there are many Akismet libraries out there: http://akismet.com/development/ and here are the API documents: http://akismet.com/development/api/ Akismet – WordPress plugin: But as I understand it, you want to use the Akismet WordPress plugin as your library. The following code snippet is a simple proof of concept, based … Read more

A spam bot loves me, what can I do?

You actually want to keep these comments marked as spam–not trashed. Akismet checks against your spam list while deciding what to do with a new comment. So having a large database of spam comments actually helps Akismet work. I get what your issue is, but what you’re essentially asking for is a spam filter for … Read more