C:\xampp\htdocs\landing\wp-content\updraft\plugins-old\wpforms-lite\wpforms.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<?php
/**
 * Plugin Name:       WPForms Lite
 * Plugin URI:        https://wpforms.com
 * Description:       Beginner friendly WordPress contact form plugin. Use our Drag & Drop form builder to create your WordPress forms.
 * Requires at least: 4.9
 * Requires PHP:      5.5
 * Author:            WPForms
 * Author URI:        https://wpforms.com
 * Version:           1.6.4.1
 * Text Domain:       wpforms-lite
 * Domain Path:       assets/languages
 *
 * WPForms is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * any later version.
 *
 * WPForms is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with WPForms. If not, see <https://www.gnu.org/licenses/>.
 */

// Exit if accessed directly.
if ( ! defined'ABSPATH' ) ) {
    exit;
}

// Plugin version.
if ( ! defined'WPFORMS_VERSION' ) ) {
    
define'WPFORMS_VERSION''1.6.4.1' );
}

// Plugin Folder Path.
if ( ! defined'WPFORMS_PLUGIN_DIR' ) ) {
    
define'WPFORMS_PLUGIN_DIR'plugin_dir_path__FILE__ ) );
}

// Plugin Folder URL.
if ( ! defined'WPFORMS_PLUGIN_URL' ) ) {
    
define'WPFORMS_PLUGIN_URL'plugin_dir_url__FILE__ ) );
}

// Plugin Root File.
if ( ! defined'WPFORMS_PLUGIN_FILE' ) ) {
    
define'WPFORMS_PLUGIN_FILE'__FILE__ );
}

// Don't allow multiple versions to be active.
if ( function_exists'wpforms' ) ) {

    if ( ! 
function_exists'wpforms_pro_just_activated' ) ) {
        
/**
         * When we are activate a Pro version, we need to do additional operations:
         * 1) deactivate a Lite version
         * 2) register option which help to run all activation process for Pro version (custom tables creation, etc.)
         *
         * @since 1.6.2
         */
        
function wpforms_pro_just_activated() {

            
wpforms_deactivate();
            
add_option'wpforms_install');
        }
    }
    
add_action'activate_wpforms/wpforms.php''wpforms_pro_just_activated' );

    if ( ! 
function_exists'wpforms_lite_just_activated' ) ) {
        
/**
         * Store temporarily that the Lite version of the plugin was activated.
         * This is needed because WP does a redirect after activation and
         * we need to preserve this state to know whether user activated Lite or not.
         *
         * @since 1.5.8
         */
        
function wpforms_lite_just_activated() {

            
set_transient'wpforms_lite_just_activated'true );
        }
    }
    
add_action'activate_wpforms-lite/wpforms.php''wpforms_lite_just_activated' );

    if ( ! 
function_exists'wpforms_lite_just_deactivated' ) ) {
        
/**
         * Store temporarily that Lite plugin was deactivated.
         * Convert temporary "activated" value to a global variable,
         * so it is available through the request. Remove from the storage.
         *
         * @since 1.5.8
         */
        
function wpforms_lite_just_deactivated() {

            global 
$wpforms_lite_just_activated$wpforms_lite_just_deactivated;

            
$wpforms_lite_just_activated   = (bool) get_transient'wpforms_lite_just_activated' );
            
$wpforms_lite_just_deactivated true;

            
delete_transient'wpforms_lite_just_activated' );
        }
    }
    
add_action'deactivate_wpforms-lite/wpforms.php''wpforms_lite_just_deactivated' );

    if ( ! 
function_exists'wpforms_deactivate' ) ) {
        
/**
         * Deactivate Lite if WPForms already activated.
         *
         * @since 1.0.0
         */
        
function wpforms_deactivate() {

            
$plugin 'wpforms-lite/wpforms.php';

            
deactivate_plugins$plugin );

            
do_action'wpforms_plugin_deactivated'$plugin );
        }
    }
    
add_action'admin_init''wpforms_deactivate' );

    if ( ! 
function_exists'wpforms_lite_notice' ) ) {
        
/**
         * Display the notice after deactivation when Pro is still active
         * and user wanted to activate the Lite version of the plugin.
         *
         * @since 1.0.0
         */
        
function wpforms_lite_notice() {

            global 
$wpforms_lite_just_activated$wpforms_lite_just_deactivated;

            if (
                empty( 
$wpforms_lite_just_activated ) ||
                empty( 
$wpforms_lite_just_deactivated )
            ) {
                return;
            }

            
// Currently tried to activate Lite with Pro still active, so display the message.
            
printf(
                
'<div class="notice notice-warning">
                    <p>%1$s</p>
                    <p>%2$s</p>
                </div>'
,
                
esc_html__'Heads up!''wpforms-lite' ),
                
esc_html__'Your site already has WPForms Pro activated. If you want to switch to WPForms Lite, please first go to Plugins → Installed Plugins and deactivate WPForms. Then, you can activate WPForms Lite.''wpforms-lite' )
            );

            if ( isset( 
$_GET['activate'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
                
unset( $_GET['activate'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
            
}

            unset( 
$wpforms_lite_just_activated$wpforms_lite_just_deactivated );
        }
    }
    
add_action'admin_notices''wpforms_lite_notice' );

    
// Do not process the plugin code further.
    
return;
}

// We require PHP 5.5+ for the whole plugin to work.
if ( version_comparephpversion(), '5.5''<' ) ) {

    if ( ! 
function_exists'wpforms_php52_notice' ) ) {
        
/**
         * Display the notice after deactivation.
         *
         * @since 1.5.0
         */
        
function wpforms_php52_notice() {
            
?>
            <div class="notice notice-error">
                <p>
                    <?php
                    printf
(
                        
wp_kses(
                            
/* translators: %s - WPBeginner URL for recommended WordPress hosting. */
                            
__'Your site is running an <strong>insecure version</strong> of PHP that is no longer supported. Please contact your web hosting provider to update your PHP version or switch to a <a href="%s" target="_blank" rel="noopener noreferrer">recommended WordPress hosting company</a>.''wpforms-lite' ),
                            array(
                                
'a'      => array(
                                    
'href'   => array(),
                                    
'target' => array(),
                                    
'rel'    => array(),
                                ),
                                
'strong' => array(),
                            )
                        ),
                        
'https://www.wpbeginner.com/wordpress-hosting/'
                    
);
                    
?>
                    <br><br>
                    <?php
                    printf
(
                        
wp_kses(
                            
/* translators: %s - WPForms.com URL for documentation with more details. */
                            
__'<strong>Note:</strong> WPForms plugin is disabled on your site until you fix the issue. <a href="%s" target="_blank" rel="noopener noreferrer">Read more for additional information.</a>''wpforms-lite' ),
                            array(
                                
'a'      => array(
                                    
'href'   => array(),
                                    
'target' => array(),
                                    
'rel'    => array(),
                                ),
                                
'strong' => array(),
                            )
                        ),
                        
'https://wpforms.com/docs/supported-php-version/'
                    
);
                    
?>
                </p>
            </div>

            <?php
            
// In case this is on plugin activation.
            
if ( isset( $_GET['activate'] ) ) { //phpcs:ignore
                
unset( $_GET['activate'] );
            }
        }
    }
    
add_action'admin_notices''wpforms_php52_notice' );

    
// Do not process the plugin code further.
    
return;
}

// Define the class and the function.
require_once dirname__FILE__ ) . '/src/WPForms.php';

wpforms();
x

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