You are here

function template_preprocess_recaptcha_widget_noscript in reCAPTCHA 8.2

Same name and namespace in other branches
  1. 8.3 recaptcha.module \template_preprocess_recaptcha_widget_noscript()
  2. 6.2 recaptcha.module \template_preprocess_recaptcha_widget_noscript()
  3. 7.2 recaptcha.module \template_preprocess_recaptcha_widget_noscript()

Process variables for recaptcha-widget-noscript.tpl.php.

See also

recaptcha-widget-noscript.tpl.php

File

./recaptcha.module, line 226
Verifies if user is a human without necessity to solve a CAPTCHA.

Code

function template_preprocess_recaptcha_widget_noscript(&$variables) {
  $variables['sitekey'] = $variables['widget']['sitekey'];
  $variables['language'] = $variables['widget']['language'];
  $variables['url'] = Url::fromUri($variables['widget']['recaptcha_src_fallback'], [
    'query' => [
      'k' => $variables['widget']['sitekey'],
      'hl' => $variables['widget']['language'],
    ],
    'absolute' => TRUE,
  ])
    ->toString();
}