PluginProbe
WS Form LITE – Drag & Drop Contact Form Builder / 1.11.17
WS Form LITE – Drag & Drop Contact Form Builder v1.11.17
1.12.10 1.12.8 1.12.6 1.12.5 1.12.3 1.12.0 1.11.19 1.11.17 1.11.16 1.11.15 1.11.14 1.11.11 1.11.8 1.11.5 1.11.4 1.9.248 1.9.249 1.9.26 1.9.43 1.9.46 1.9.47 1.9.5 1.9.6 1.9.64 1.9.7 All 363 releases
ws-form / ws-form.php

ws-form.php in WS Form LITE – Drag & Drop Contact Form Builder 1.11.17, at ws-form.php

214 lines 7.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * WS Form LITE - Drag & Drop Contact Form Builder
5 *
6 * @link https://wsform.com/
7 * @since 1.0.0
8 * @package WS_Form
9 *
10 * @wordpress-plugin
11 * Plugin Name: WS Form LITE - Drag & Drop Contact Form Builder
12 * Plugin URI: https://wsform.com/
13 * Description: Smart. Fast. Forms.
14 * Version: 1.11.17
15 * Requires at least: 5.5
16 * Requires PHP: 7.2
17 * Author: WS Form
18 * Author URI: https://wsform.com/
19 * License: GPL-3.0+
20 * License URI: http://www.gnu.org/licenses/gpl-3.0.txt
21 * Text Domain: ws-form
22 * Domain Path: /languages
23 */
24
25 // If this file is called directly, abort.
26 if(!defined('WPINC')) {
27
28 die;
29 }
30
31 // Load plugin.php
32 if(!function_exists('is_plugin_active')) {
33
34 include_once(ABSPATH . 'wp-admin/includes/plugin.php');
35 }
36
37 if(!is_plugin_active('ws-form-pro/ws-form.php')) {
38 // Constants
39 define('WS_FORM_NAME', 'ws-form');
40 define('WS_FORM_VERSION', '1.11.17');
41 define('WS_FORM_NAME_GENERIC', 'WS Form');
42 define('WS_FORM_NAME_PRESENTABLE', 'WS Form LITE');
43 define('WS_FORM_EDITION', 'basic');
44 define('WS_FORM_PLUGIN_FOLDER', 'ws-form');
45 define('WS_FORM_URL_HOME', 'https://wordpress.org/plugins/ws-form/');
46 define('WS_FORM_URL_DOWNLOAD', 'https://downloads.wordpress.org/plugin/ws-form.zip');
47 define('WS_FORM_UPLOAD_DIR', 'ws-form');
48 define('WS_FORM_IDENTIFIER', 'ws_form');
49 define('WS_FORM_DB_TABLE_PREFIX', 'wsf_');
50 define('WS_FORM_OPTION_NAME', 'ws_form');
51 define('WS_FORM_OPTION_SEPARATE_ACTION', false);
52 define('WS_FORM_OPTION_SEPARATE_CSS', true);
53 define('WS_FORM_OPTION_SEPARATE_TRANSLATE', true);
54 define('WS_FORM_SHORTCODE', 'ws_form');
55 define('WS_FORM_WIDGET', 'ws_form_widget');
56 define('WS_FORM_CAPABILITY_PREFIX', 'wsf_');
57 define('WS_FORM_USER_REQUEST_IDENTIFIER', 'ws-form');
58 define('WS_FORM_AUTHOR', 'Westguard Solutions');
59
60 // Paths
61 define('WS_FORM_PLUGIN_ROOT_FILE', __FILE__);
62 define('WS_FORM_PLUGIN_DIR_PATH', plugin_dir_path(__FILE__));
63 define('WS_FORM_PLUGIN_DIR_URL', plugin_dir_url(__FILE__));
64 define('WS_FORM_PLUGIN_BASENAME', plugin_basename(__FILE__));
65
66 // NONCE
67 define('WS_FORM_POST_NONCE_FIELD_NAME', 'wsf_nonce');
68 define('WS_FORM_POST_NONCE_ACTION_NAME', 'wsf_post');
69
70 // REST API
71 define('WS_FORM_RESTFUL_NAMESPACE', 'ws-form/v1');
72
73 // Framework
74 define('WS_FORM_DEFAULT_FRAMEWORK', 'ws-form');
75
76 // caniuse.com
77 define('WS_FORM_COMPATIBILITY_NAME', 'caniuse.com');
78 define('WS_FORM_COMPATIBILITY_URL', 'https://caniuse.com');
79 define('WS_FORM_COMPATIBILITY_MASK', 'https://caniuse.com/#feat=#compatibility_id');
80
81 // Captchas / Spam
82 define('WS_FORM_RECAPTCHA_ENDPOINT', 'https://www.google.com/recaptcha/api/siteverify');
83 define('WS_FORM_RECAPTCHA_QUERY_VAR', 'g-recaptcha-response');
84 define('WS_FORM_HCAPTCHA_ENDPOINT', 'https://hcaptcha.com/siteverify');
85 define('WS_FORM_HCAPTCHA_QUERY_VAR', 'h-captcha-response');
86 define('WS_FORM_TURNSTILE_ENDPOINT', 'https://challenges.cloudflare.com/turnstile/v0/siteverify');
87 define('WS_FORM_TURNSTILE_QUERY_VAR', 'cf-turnstile-response');
88 define('WS_FORM_CAPTCHAFOX_ENDPOINT', 'https://api.captchafox.com/siteverify');
89 define('WS_FORM_CAPTCHAFOX_QUERY_VAR', 'cf-captcha-response');
90 define('WS_FORM_SPAM_LEVEL_MAX', 100); // 0 = Not spam, 100 = Spam
91
92 // Labels
93 define('WS_FORM_LABEL_MAX_LENGTH', 1024);
94
95 // Sections
96 define('WS_FORM_SECTION_REPEATABLE_DELIMITER_SECTION', ',');
97 define('WS_FORM_SECTION_REPEATABLE_DELIMITER_ROW', ';');
98 define('WS_FORM_SECTION_REPEATABLE_DELIMITER_SUBMIT', '<br />');
99
100 // Fields
101 define('WS_FORM_FIELD_PREFIX', 'field_');
102 define('WS_FORM_FIELD_PREFIX_PUBLIC_', 'wsf_field_');
103
104 // Settings - Email
105 define('WS_FORM_SETTINGS_IMAGE_PREVIEW_SIZE', 'full');
106
107 // Settings - System
108 define('WS_FORM_MIN_VERSION_WORDPRESS', '5.5');
109 define('WS_FORM_MIN_VERSION_PHP', '7.2');
110 define('WS_FORM_MIN_VERSION_MYSQL', '5.6');
111 define('WS_FORM_MIN_INPUT_VARS', 100);
112 define('WS_FORM_MAX_MYSQL_ALLOWED_PACKET', 4194304);
113
114 // wp_remote_* settings
115 define('WS_FORM_API_CALL_TIMEOUT', 15);
116 define('WS_FORM_API_CALL_SSL_VERIFY', true);
117
118 // Review nag
119 define('WS_FORM_REVIEW_NAG_DURATION', 14);
120
121 // Layout editor intro tutorial (intro.js hints). Set to false to disable the first-run tutorial.
122 define('WS_FORM_INTRO', false);
123
124 // Data sources
125 define('WS_FORM_DATA_SOURCE_SCHEDULE_ID_PREFIX', 'wsf_');
126 define('WS_FORM_DATA_SOURCE_SCHEDULE_HOOK', 'ws_form_wp_cron_data_source');
127
128 // Reports
129 define('WS_FORM_REPORT_SCHEDULE_HOOK', 'ws_form_wp_cron_report');
130 define('WS_FORM_REPORT_ID_FORM_STATISTICS', 'ws_form_form_statistics');
131
132 // CSV imports for data grids
133 define('WS_FORM_UTF32_BIG_ENDIAN_BOM' , chr(0x00) . chr(0x00) . chr(0xFE) . chr(0xFF));
134 define('WS_FORM_UTF32_LITTLE_ENDIAN_BOM', chr(0xFF) . chr(0xFE) . chr(0x00) . chr(0x00));
135 define('WS_FORM_UTF16_BIG_ENDIAN_BOM' , chr(0xFE) . chr(0xFF));
136 define('WS_FORM_UTF16_LITTLE_ENDIAN_BOM', chr(0xFF) . chr(0xFE));
137 define('WS_FORM_UTF8_BOM' , chr(0xEF) . chr(0xBB) . chr(0xBF));
138
139 // Templates
140 define('WS_FORM_TEMPLATE_SVG_WIDTH_FORM', 140);
141 define('WS_FORM_TEMPLATE_SVG_HEIGHT_FORM', 180);
142 define('WS_FORM_TEMPLATE_SVG_WIDTH_SECTION', 140);
143 define('WS_FORM_TEMPLATE_SVG_HEIGHT_SECTION', 85);
144 define('WS_FORM_TEMPLATE_CHECKSUM_REPAIR', false);
145
146 // Submission exports
147 define('WS_FORM_SUBMIT_EXPORT_PAGE_SIZE', 200);
148 define('WS_FORM_SUBMIT_EXPORT_FILE_SIZE_ZIP', 524288);
149 define('WS_FORM_SUBMIT_EXPORT_TMP_DIR', 'submit/export/tmp');
150
151 // File uploads
152 define('WS_FORM_DROPZONEJS_IMAGE_SIZE', 'thumbnail');
153
154 // Styler / CSS
155 define('WS_FORM_STYLER', true);
156 define('WS_FORM_CSS_CACHE_DURATION_DEFAULT', 31536000);
157 define('WS_FORM_CSS_FILE_PATH', 'css/public');
158 define('WS_FORM_CSS_SKIN_DEFAULT', 'ws_form');
159
160 // AI
161 define('WS_FORM_ABILITY_API', true);
162 define('WS_FORM_ABILITY_API_NAMESPACE', 'ws-form/');
163 define('WS_FORM_MCP_ADAPTER', true);
164 define('WS_FORM_ANGIE', true);
165 define('WS_FORM_WP_AI_CLIENT', true);
166
167 // Resizable sidebar
168 define('WS_FORM_SIDEBAR_WIDTH_MIN', 340);
169 define('WS_FORM_SIDEBAR_WIDTH_MAX', 1000);
170 define('WS_FORM_SIDEBAR_WIDTH_DEFAULT', WS_FORM_SIDEBAR_WIDTH_MIN);
171 }
172
173 function ws_form_activate() {
174
175 if(is_plugin_active('ws-form-pro/ws-form.php')) {
176
177 deactivate_plugins('ws-form-pro/ws-form.php');
178 }
179
180 require_once WS_FORM_PLUGIN_DIR_PATH . 'includes/class-ws-form-activator.php';
181 WS_Form_Activator::activate();
182 }
183
184 // Deactivate
185 function ws_form_deactivate() {
186
187 require_once WS_FORM_PLUGIN_DIR_PATH . 'includes/class-ws-form-deactivator.php';
188 WS_Form_Deactivator::deactivate();
189 }
190
191 // Uninstall
192 function ws_form_uninstall() {
193
194 require_once WS_FORM_PLUGIN_DIR_PATH . 'includes/class-ws-form-uninstaller.php';
195 WS_Form_Uninstaller::uninstall();
196 }
197
198 // Register hooks for plugin activation, deactivation and uninstall
199 register_activation_hook(__FILE__, 'ws_form_activate');
200 register_deactivation_hook(__FILE__, 'ws_form_deactivate');
201 register_uninstall_hook(__FILE__, 'ws_form_uninstall');
202
203 if(!is_plugin_active('ws-form-pro/ws-form.php')) {
204
205 require WS_FORM_PLUGIN_DIR_PATH . 'includes/class-ws-form.php';
206
207 function ws_form_run() {
208
209 $plugin = new WS_Form();
210 $plugin->run();
211 }
212 ws_form_run();
213 }
214