settings = $settings; $this->wp = $wp; } public function render(): string { $captchaSettings = $this->settings->get('captcha'); $isInvisible = $captchaSettings['type'] === CaptchaConstants::TYPE_RECAPTCHA_INVISIBLE; if ($isInvisible) { $siteKey = $this->wp->escAttr($captchaSettings['recaptcha_invisible_site_token']); $html = '
'; } else { $siteKey = $this->wp->escAttr($captchaSettings['recaptcha_site_token']); $html = ''; } return $html; } }