| @@ -30,8 +30,9 @@ | ||
| 30 | 30 | |
| 31 | 31 | weforms()->scripts->enqueue_backend(); |
| 32 | 32 | |
| 33 | 33 | $recaptcha = weforms_get_settings( 'recaptcha' ); |
| 34 | + $humanpresence = get_option( 'wp-human-presence', array() ); | |
| 34 | 35 | |
| 35 | 36 | $wpuf_form_builder = apply_filters( 'wpuf-form-builder-localize-script', [ |
| 36 | 37 | 'i18n' => $this->i18n(), |
| 37 | 38 | 'panel_sections' => weforms()->fields->get_field_groups(), |
| @@ -63,11 +64,16 @@ | ||
| 63 | 64 | ], |
| 64 | 65 | ], |
| 65 | 66 | ], |
| 66 | 67 | ], |
| 67 | - 'integrations' => weforms()->integrations->get_integration_js_settings(), | |
| 68 | - 'recaptcha_site' => isset( $recaptcha->key ) ? $recaptcha->key : '', | |
| 69 | - 'recaptcha_secret' => isset( $recaptcha->secret ) ? $recaptcha->secret : '', | |
| 68 | + 'integrations' => weforms()->integrations->get_integration_js_settings(), | |
| 69 | + 'recaptcha_site' => isset( $recaptcha->key ) ? $recaptcha->key : '', | |
| 70 | + 'recaptcha_secret' => isset( $recaptcha->secret ) ? $recaptcha->secret : '', | |
| 71 | + 'humanpresence_installed' => ( | |
| 72 | + class_exists( 'HumanPresenceWEFormsIntegration' ) && | |
| 73 | + isset( $humanpresence['wp_hp_premium_license'] ) && | |
| 74 | + $humanpresence['wp_hp_premium_license'] ) | |
| 75 | + ? true : false, | |
| 70 | 76 | ] ); |
| 71 | 77 | |
| 72 | 78 | // mixins |
| 73 | 79 | $wpuf_mixins = [ |
| @@ -88,9 +94,9 @@ | ||
| 88 | 94 | 'mixins' => [ 'default' => null ], |
| 89 | 95 | 'assetsURL' => WEFORMS_ASSET_URI, |
| 90 | 96 | 'shortcodes' => $this->shortcodes(), |
| 91 | 97 | 'settings' => [ |
| 92 | - 'recaptcha' => weforms_get_settings( 'recaptcha' ), | |
| 98 | + 'recaptcha' => weforms_get_settings( 'recaptcha' ), | |
| 93 | 99 | ], |
| 94 | 100 | ] ); |
| 95 | 101 | |
| 96 | 102 | wp_localize_script( 'weforms-form-builder-mixins', 'wpuf_form_builder', $wpuf_form_builder ); |
| @@ -338,8 +344,9 @@ | ||
| 338 | 344 | |
| 339 | 345 | <a href="#" :class="['nav-tab', isActiveSettingsTab( 'form' ) ? 'nav-tab-active' : '']" v-on:click.prevent="makeActiveSettingsTab( 'form' )" class="nav-tab"><?php esc_html_e( 'Form Settings', 'weforms' ); ?></a> |
| 340 | 346 | <a href="#" :class="['nav-tab', isActiveSettingsTab( 'restriction' ) ? 'nav-tab-active' : '']" v-on:click.prevent="makeActiveSettingsTab( 'restriction' )" class="nav-tab"><?php esc_html_e( 'Submission Restriction', 'weforms' ); ?></a> |
| 341 | 347 | <a href="#" :class="['nav-tab', isActiveSettingsTab( 'display' ) ? 'nav-tab-active' : '']" v-on:click.prevent="makeActiveSettingsTab( 'display' )" class="nav-tab"><?php esc_html_e( 'Display Settings', 'weforms' ); ?></a> |
| 348 | + <a href="#" :class="['nav-tab', isActiveSettingsTab( 'humanpresence' ) ? 'nav-tab-active' : '']" v-on:click.prevent="makeActiveSettingsTab( 'humanpresence' )" class="nav-tab"><i aria-hidden="true" class="fa fa-humanpresence"></i> <?php esc_html_e( 'HP Anti-Spam', 'weforms' ); ?></a> | |
| 342 | 349 | |
| 343 | 350 | <?php do_action( 'wpuf_contact_form_settings_tab' ); ?> |
| 344 | 351 | |
| 345 | 352 | <?php |
| @@ -361,8 +368,12 @@ | ||
| 361 | 368 | </div> |
| 362 | 369 | |
| 363 | 370 | <div id="wpuf-metabox-settings-display" class="tab-content" v-show="isActiveSettingsTab('display')"> |
| 364 | 371 | <?php include_once __DIR__ . '/views/display-settings.php'; ?> |
| 372 | + </div> | |
| 373 | + | |
| 374 | + <div id="wpuf-metabox-settings-humanpresence" class="tab-content" v-show="isActiveSettingsTab('humanpresence')"> | |
| 375 | + <?php include_once __DIR__ . '/views/humanpresence-settings.php'; ?> | |
| 365 | 376 | </div> |
| 366 | 377 | |
| 367 | 378 | <?php do_action( 'wpuf_contact_form_settings_tab_content' ); ?> |
| 368 | 379 | |