C:\xampp\htdocs\landing\wp-content\updraft\plugins-old\wpforms-lite\includes\class-fields.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
/**
 * Load the field types.
 *
 * @since 1.0.0
 */
class WPForms_Fields {

    
/**
     * Primary class constructor.
     *
     * @since 1.0.0
     */
    
public function __construct() {
        
$this->init();
    }

    
/**
     * Load and init the base field class.
     *
     * @since 1.2.8
     */
    
public function init() {

        
// Parent class template.
        
require_once WPFORMS_PLUGIN_DIR 'includes/fields/class-base.php';

        
// Load default fields on WP init.
        
add_action'init', array( $this'load' ) );
    }

    
/**
     * Load default field types.
     *
     * @since 1.0.0
     */
    
public function load() {

        
$fields apply_filters(
            
'wpforms_load_fields',
            array(
                
'text',
                
'textarea',
                
'select',
                
'radio',
                
'checkbox',
                
'divider',
                
'email',
                
'url',
                
'hidden',
                
'html',
                
'name',
                
'password',
                
'address',
                
'phone',
                
'date-time',
                
'number',
                
'page-break',
                
'rating',
                
'file-upload',
                
'payment-single',
                
'payment-multiple',
                
'payment-checkbox',
                
'payment-dropdown',
                
'payment-credit-card',
                
'payment-total',
                
'number-slider',
            )
        );

        
// Include GDPR Checkbox field if GDPR enhancements are enabled.
        
if ( wpforms_setting'gdpr'false ) ) {
            
$fields[] = 'gdpr-checkbox';
        }

        foreach ( 
$fields as $field ) {

            if ( 
file_existsWPFORMS_PLUGIN_DIR 'includes/fields/class-' $field '.php' ) ) {
                require_once 
WPFORMS_PLUGIN_DIR 'includes/fields/class-' $field '.php';
            } elseif ( 
wpforms()->pro && file_existsWPFORMS_PLUGIN_DIR 'pro/includes/fields/class-' $field '.php' ) ) {
                require_once 
WPFORMS_PLUGIN_DIR 'pro/includes/fields/class-' $field '.php';
            }
        }

        new \
WPForms_Field_Email();
    }
}
new 
WPForms_Fields();
x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586