| @@ -107,14 +107,8 @@ | ||
| 107 | 107 | 'id' => $args['html_id'], |
| 108 | 108 | 'class' => $this->class_prefix( $frm_settings ) . $this->captcha_class( $frm_settings ), |
| 109 | 109 | 'data-sitekey' => $settings->get_pubkey(), |
| 110 | 110 | ); |
| 111 | - if ( 'turnstile' === $frm_settings->active_captcha ) { | |
| 112 | - $captcha_language = $this->get_captcha_language(); | |
| 113 | - if ( $captcha_language ) { | |
| 114 | - $div_attributes['data-language'] = $captcha_language; | |
| 115 | - } | |
| 116 | - } | |
| 117 | 111 | $div_attributes = $settings->add_front_end_element_attributes( $div_attributes, $this->field ); |
| 118 | 112 | $html = '<div ' . FrmAppHelper::array_to_html_params( $div_attributes ) . '></div>'; |
| 119 | 113 | |
| 120 | 114 | return $html; |
| @@ -120,25 +114,8 @@ | ||
| 120 | 114 | return $html; |
| 121 | 115 | } |
| 122 | 116 | |
| 123 | 117 | /** |
| 124 | - * @since 6.25 | |
| 125 | - * | |
| 126 | - * @return string | |
| 127 | - */ | |
| 128 | - private function get_captcha_language() { | |
| 129 | - /** | |
| 130 | - * Allows updating the captcha language. | |
| 131 | - * | |
| 132 | - * @since 6.25 | |
| 133 | - * | |
| 134 | - * @param string $lang | |
| 135 | - * @param array $field | |
| 136 | - */ | |
| 137 | - return apply_filters( 'frm_captcha_lang', get_bloginfo( 'language' ), $this->field ); | |
| 138 | - } | |
| 139 | - | |
| 140 | - /** | |
| 141 | 118 | * @return void |
| 142 | 119 | */ |
| 143 | 120 | protected function load_field_scripts( $args ) { |
| 144 | 121 | $api_js_url = $this->api_url(); |
| @@ -198,15 +175,8 @@ | ||
| 198 | 175 | * @return string |
| 199 | 176 | */ |
| 200 | 177 | protected function hcaptcha_api_url() { |
| 201 | 178 | $api_js_url = 'https://js.hcaptcha.com/1/api.js'; |
| 202 | - | |
| 203 | - $lang = $this->get_captcha_language(); | |
| 204 | - if ( $lang ) { | |
| 205 | - // Language might be in the format of en-US, fr-FR, etc. In that case, we need to extract the first part to comply with the hcaptcha api request format. | |
| 206 | - $lang_parts = explode( '-', $lang ); | |
| 207 | - $api_js_url .= '?hl=' . $lang_parts[0]; | |
| 208 | - } | |
| 209 | 179 | |
| 210 | 180 | /** |
| 211 | 181 | * Allows updating hcaptcha js api url. |
| 212 | 182 | * |