Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (22 sloc) 0.971 kb

WordPress MicroAkismet

This is a fork of Gaby Vanhegans MicroAkismet class. Slightly modified to work as a native WordPress plugin. Comes handy whenever you need to verify posts outside WordPress own admin-interface.

Note that this plugin requires the default Akismet plugin to work since we need a valid api key.

For a complete list of keys check out Gabys documentation. The other needed keys are added by default, such as user_ip and user_agent.

Example of usage below.

global $micro_akismet;

$vars = array(
    'comment_content' => $_POST['comment_content'],
    'comment_author' => $_POST['comment_author'],
    'comment_author_email' => $_POST['comment_author_email']

if ($micro_akismet->is_spam($vars)) {
    // We caught a spammer.
} else {
    // Everything is alright.

Jump to Line
Something went wrong with that request. Please try again.