$recaptcha_public_key = '';
$recaptcha_private_key = '';
+/**
+ * Sets the theme for ReCaptcha
+ *
+ * See http://code.google.com/apis/recaptcha/docs/customization.html
+ */
+$wgReCaptchaTheme = 'red';
+
$wgExtensionFunctions[] = 'efReCaptcha';
/**
*
*/
function getForm() {
- global $wgReCaptchaPublicKey;
+ global $wgReCaptchaPublicKey, $wgReCaptchaTheme;
$useHttps = ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' );
- return "<script>var RecaptchaOptions = { tabindex : 1 }; </script> " .
- recaptcha_get_html($wgReCaptchaPublicKey, $this->recaptcha_error, $useHttps);
+ $js = 'var RecaptchaOptions = ' . Xml::encodeJsVar( array( 'theme' => $wgReCaptchaTheme, 'tabindex' => 1 ) );
+
+ return Html::inlineScript( $js ) . recaptcha_get_html($wgReCaptchaPublicKey, $this->recaptcha_error, $useHttps);
}
/**