$_recaptchaOptions
$_recaptchaOptions : array
reCAPTCHA Theme default options RecaptchaOptions Reference: {@link: https://developers.google.com/recaptcha/docs/customization}
CaptchaTheme Handle custom theming, reCAPTCHA's options and users language
custom_theme(string $widget_id) : string
Custom Theme Template In order to use a custom theme, you must set reCAPTCHA options correctly, also provide a custom CSS to display it properly.
Fully custom theme reference: {@link: https://developers.google.com/recaptcha/docs/customization#Custom_Theming}
string | $widget_id | The ID name for wrapper container |
setTranslation(string $language, string $path) : void
Custom Translations
In order to use custom translation (even if it is not built in specially for a custom theme), the translations must be set manually by this method or by passing the lang two letters code to instance constructor. It will set translation by a lang code given and overwrites other languages set in an external captcha_config file.
NOTE: If translate file recaptcha.lang[lang_code].php with its respective translation strings within a folder i18n is not found a default lang English 'en' will be used instead.
To use an external file for a custom lang translation you must create a copy of some lang file already done within the folder I18n and rename it as 'recaptcha.lang[lang_code].php' place it wherever you want and tell as second parameter its absolute $path without filename
string | $language | Two letter language code e.g: (Italian = 'it') |
string | $path | Optional path to translate file |
_theme(string $theme_name, array $options) : string
Standard Theme Display's Theme customization for reCAPTCHA widget by writting a snippet for Standard_Themes and Custom_Theming
string | $theme_name | Optional theme name. NOTE: overwrite theme if it's set in an external config |
array | $options | reCAPTCHA Associative array of available options. NOTE: overwrite options set in an external config |
Standard_Theme | Custom_Theme | Fallback default reCAPTCHA theme