AkismetSpamProtector
class AkismetSpamProtector implements SpamProtector (View source)
Spam protector for Akismet
Properties
protected static | string | $_api_key | Overridden API key |
Methods
public static
api()
Retrieves Akismet API object singleton, or null if not configured
public
getFormField(string $name = null, string $title = null, mixed $value = null, $form = null, $rightTitle = null)
Return the FormField associated with this protector.
Details
static
set_api_key(string $key)
Set the API key
static protected string
get_api_key()
Get the API key
static AkismetService
api()
Retrieves Akismet API object singleton, or null if not configured
FormField
getFormField(string $name = null, string $title = null, mixed $value = null, $form = null, $rightTitle = null)
Return the FormField associated with this protector.
Most spam methods will simply return a piece of HTML to be injected at the end of the form. If a spam method needs to inject more than one form field (i.e a hidden field and a text field) then return a FieldGroup from this method to include both.
setFieldMapping(array $fieldMapping)
Set the fields to map spam protection too