PluginProbe
weForms – Easy Drag & Drop Contact Form Builder For WordPress / 1.6.8
weForms – Easy Drag & Drop Contact Form Builder For WordPress v1.6.8
1.6.7 1.6.8 1.6.9 1.6.12 1.6.13 1.6.14 1.6.15 1.6.16 1.6.17 1.6.18 1.6.19 1.6.2 1.6.20 1.6.21 1.6.22 1.6.23 1.6.24 1.6.25 1.6.26 1.6.27 1.6.28 1.6.3 1.6.4 1.6.5 1.6.6 All 74 releases
weforms / includes / fields / class-field-humanpresence.php

class-field-humanpresence.php in weForms – Easy Drag & Drop Contact Form Builder For WordPress 1.6.8, at includes/fields/class-field-humanpresence.php

75 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Text Field Class
5 */
6 class WeForms_Form_Field_HumanPresence extends WeForms_Field_Contract {
7
8 public function __construct() {
9 $this->name = __( 'HP Anti-Spam', 'weforms' );
10 $this->input_type = 'humanpresence';
11 $this->icon = 'humanpresence';
12 }
13
14 /**
15 * Render the field
16 *
17 * @param array $field_settings
18 * @param int $form_id
19 *
20 * @return void
21 */
22 public function render( $field_settings, $form_id ) {
23
24 }
25
26 /**
27 * Custom validator
28 *
29 * @return array
30 */
31 public function get_validator() {
32 return [
33 'callback' => 'has_humanpresence_installed',
34 'button_class' => 'button-faded',
35 'msg_title' => __( 'Human Presence Anti-Spam Required', 'weforms' ),
36 'msg' => apply_filters( 'wpuf-form-builder-humanpresence-validation-msg', sprintf(
37 __( 'To enable Human Presence Anti-Spam on weForms, <a href="%s" target="_blank">Install and activate the plugin</a> on your site. Once installed, toggle on the weForms form you want to protect.', 'weforms' ),
38 // admin_url( 'admin.php?page=weforms#/settings' ),
39 'http://www.humanpresence.io/weforms-signup'
40 ) ),
41 ];
42 }
43
44 /**
45 * Get field options setting
46 *
47 * @return array
48 */
49 public function get_options_settings() {
50 $settings = [
51 ];
52
53 return $settings;
54 }
55
56 /**
57 * Get the field props
58 *
59 * @return array
60 */
61 public function get_field_props() {
62 $props = [
63 'template' => $this->get_type(),
64 'label' => '',
65 'is_meta' => 'yes',
66 'id' => 0,
67 'is_new' => true,
68 'wpuf_cond' => null,
69 ];
70
71 return $props;
72 }
73
74 }
75