You are here

function BotchaRecipeHoneypot2::getCss in BOTCHA Spam Prevention 7.2

Same name and namespace in other branches
  1. 6.2 controller/botcha_recipe.controller.inc \BotchaRecipeHoneypot2::getCss()

Should be overridden.

Return value

string

Overrides BotchaRecipeUsingJsAbstract::getCss

File

controller/botcha_recipe.controller.inc, line 668
Controller layer of the BotchaRecipe objects.

Class

BotchaRecipeHoneypot2

Code

function getCss() {
  $fields = $this
    ->getProperty($this->settings['fields'], 'getFields');
  $js = $this
    ->getProperty($this->settings['js'], 'getJs');
  $chops_positions = array_keys($js['chops']);
  $css_tok2 = substr($js['secure_token'], $chops_positions[0] + $chops_positions[1]);

  // 'a' before css token is because font name must start with a letter.
  return parent::getCss() . " input.{$fields[0]['class']} { font-family: sans-serif, a{$css_tok2} !important; }";
}