MediaWiki  1.34.0
ReCaptchaNoCaptchaHooks.php
Go to the documentation of this file.
1 <?php
2 
10  public static function onResourceLoaderGetConfigVars( array &$vars ) {
11  global $wgReCaptchaSiteKey;
12  global $wgCaptchaClass;
13 
14  if ( $wgCaptchaClass === 'ReCaptchaNoCaptcha' ) {
15  $vars['wgConfirmEditConfig'] = [
16  'reCaptchaSiteKey' => $wgReCaptchaSiteKey,
17  'reCaptchaScriptURL' => 'https://www.google.com/recaptcha/api.js'
18  ];
19  }
20 
21  return true;
22  }
23 }
ReCaptchaNoCaptchaHooks
Definition: ReCaptchaNoCaptchaHooks.php:3
ReCaptchaNoCaptchaHooks\onResourceLoaderGetConfigVars
static onResourceLoaderGetConfigVars(array &$vars)
Adds extra variables to the global config.
Definition: ReCaptchaNoCaptchaHooks.php:10