| @@ -19,14 +19,13 @@ | ||
| 19 | 19 | * |
| 20 | 20 | * @return void |
| 21 | 21 | */ |
| 22 | 22 | public function render( $field_settings, $form_id ) { |
| 23 | - $settings = weforms_get_settings( 'recaptcha' ); | |
| 24 | - $is_invisible = false; | |
| 25 | - $public_key = isset( $settings->key ) ? $settings->key : ''; | |
| 26 | - $type = isset( $settings->type ) ? $settings->type : ''; | |
| 27 | - $theme = isset( $field_settings['recaptcha_theme'] ) ? $field_settings['recaptcha_theme'] : 'light'; | |
| 28 | - $use_theme_css = isset( $form_settings['use_theme_css'] ) ? $form_settings['use_theme_css'] : 'wpuf-style'; | |
| 23 | + $settings = weforms_get_settings( 'recaptcha' ); | |
| 24 | + $is_invisible = false; | |
| 25 | + $public_key = isset( $settings->key ) ? $settings->key : ''; | |
| 26 | + $type = isset( $settings->type ) ? $settings->type : ''; | |
| 27 | + $theme = isset( $field_settings['recaptcha_theme'] ) ? $field_settings['recaptcha_theme'] : 'light'; | |
| 29 | 28 | /** Recaptcha V3 start */ |
| 30 | 29 | if( 'v3' == $type ) { ?> |
| 31 | 30 | <li <?php $this->print_list_attributes( $field_settings ); ?> > |
| 32 | 31 | <?php if ( ! $public_key ) { |
| @@ -32,9 +31,9 @@ | ||
| 32 | 31 | <?php if ( ! $public_key ) { |
| 33 | 32 | esc_html_e( 'reCaptcha API key is missing.', 'weforms'); |
| 34 | 33 | } else { ?> |
| 35 | 34 | <li <?php $this->print_list_attributes( $field_settings ); ?> > |
| 36 | - <div class="wpuf-fields <?php echo ' wpuf_'. esc_attr( $field_settings['name'] ).'_'. esc_attr( $form_id ); ?>" data-style="<?php echo esc_attr( $use_theme_css ); ?>"> | |
| 35 | + <div class="wpuf-fields <?php echo ' wpuf_'. esc_attr( $field_settings['name'] ).'_'. esc_attr( $form_id ); ?>"> | |
| 37 | 36 | <input type="hidden" name="g-recaptcha-response" id="g-recaptcha-response"> |
| 38 | 37 | <input type="hidden" name="g-action" id="g-action"> |
| 39 | 38 | <script src="https://www.google.com/recaptcha/api.js?render=<?php echo esc_attr( $public_key );?>"> </script> |
| 40 | 39 | <script> |