PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.24.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.24.1
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/models/fields/FrmFieldCaptcha.php +0 -30 6.256.24.1 View file →
@@ -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 *