PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.18
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.18
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/models/FrmUsage.php +2 -38 6.266.18 View file →
@@ -44,11 +44,8 @@
44 44 }
45 45
46 46 /**
47 47 * @since 3.06.04
48 - *
49 - * @param bool $regenerate
50 - *
51 48 * @return string
52 49 */
53 50 public function uuid( $regenerate = false ) {
54 51 $uuid_key = 'frm-usage-uuid';
@@ -65,9 +62,8 @@
65 62 }
66 63
67 64 /**
68 65 * @since 3.06.04
69 - *
70 66 * @return array
71 67 */
72 68 public function snapshot() {
73 69 global $wpdb, $wp_version;
@@ -99,9 +95,8 @@
99 95 'fields' => $this->fields(),
100 96 'actions' => $this->actions(),
101 97
102 98 'onboarding-wizard' => $this->onboarding_wizard(),
103 - 'welcome-tour' => FrmWelcomeTourController::get_usage_data(),
104 99 'flows' => FrmUsageController::get_flows_data(),
105 100 'payments' => $this->payments(),
106 101 'subscriptions' => $this->payments( 'frm_subscriptions' ),
107 102 );
@@ -142,14 +137,12 @@
142 137 *
143 138 * @since 6.16.1
144 139 *
145 140 * @param string $table Database table name.
146 - *
147 141 * @return array
148 142 */
149 143 private function payments( $table = 'frm_payments' ) {
150 144 $allowed_tables = array( 'frm_payments', 'frm_subscriptions' );
151 -
152 145 if ( ! in_array( $table, $allowed_tables, true ) ) {
153 146 return array();
154 147 }
155 148
@@ -165,9 +158,8 @@
165 158 )
166 159 );
167 160
168 161 $payments = array();
169 -
170 162 foreach ( $rows as $row ) {
171 163 $payments[] = array(
172 164 'amount' => (float) $row->amount,
173 165 'status' => $row->status,
@@ -180,9 +172,8 @@
180 172 }
181 173
182 174 /**
183 175 * @since 3.06.04
184 - *
185 176 * @return array
186 177 */
187 178 private function plugins() {
188 179 $plugin_list = FrmAppHelper::get_plugins();
@@ -187,9 +178,8 @@
187 178 private function plugins() {
188 179 $plugin_list = FrmAppHelper::get_plugins();
189 180
190 181 $plugins = array();
191 -
192 182 foreach ( $plugin_list as $slug => $info ) {
193 183 $plugins[] = array(
194 184 'name' => $info['Name'],
195 185 'slug' => $slug,
@@ -204,9 +194,8 @@
204 194 /**
205 195 * Add global settings to tracking data.
206 196 *
207 197 * @since 3.06.04
208 - *
209 198 * @return array
210 199 */
211 200 private function settings() {
212 201 $settings_list = FrmAppHelper::get_settings();
@@ -223,19 +212,13 @@
223 212 'menu',
224 213 'mu_menu',
225 214 'no_ips',
226 215 'custom_header_ip',
227 - 'enable_gdpr',
228 - 'no_gdpr_cookies',
229 216 'btsp_css',
230 217 'btsp_version',
231 218 'admin_bar',
232 219 'summary_emails',
233 220 'active_captcha',
234 - 'honeypot',
235 - 'wp_spam_check',
236 - 'denylist_check',
237 - 'email_style',
238 221 );
239 222
240 223 foreach ( $pass_settings as $setting ) {
241 224 if ( isset( $settings_list->$setting ) ) {
@@ -256,9 +239,8 @@
256 239 *
257 240 * @since 3.06.04
258 241 *
259 242 * @param FrmSettings $settings_list
260 - *
261 243 * @return array
262 244 */
263 245 private function messages( $settings_list ) {
264 246 $messages = array(
@@ -274,9 +256,8 @@
274 256
275 257 $default = $settings_list->default_options();
276 258
277 259 $message_settings = array();
278 -
279 260 foreach ( $messages as $message ) {
280 261 $message_settings[ 'changed-' . $message ] = $settings_list->$message === $default[ $message ] ? 0 : 1;
281 262 }
282 263
@@ -288,9 +269,8 @@
288 269 *
289 270 * @since 3.06.04
290 271 *
291 272 * @param FrmSettings $settings_list
292 - *
293 273 * @return array
294 274 */
295 275 private function permissions( $settings_list ) {
296 276 $permissions = array();
@@ -306,9 +286,8 @@
306 286 }
307 287
308 288 /**
309 289 * @since 3.06.04
310 - *
311 290 * @return array
312 291 */
313 292 private function forms() {
314 293 $s_query = array(
@@ -323,10 +302,10 @@
323 302 $forms = array();
324 303 $settings = array(
325 304 'form_class',
326 305 'akismet',
306 + 'honeypot',
327 307 'antispam',
328 - 'stopforumspam',
329 308 'custom_style',
330 309 'success_action',
331 310 'show_form',
332 311 'no_save',
@@ -356,9 +335,8 @@
356 335 'submit_conditions',
357 336 );
358 337
359 338 $style = new FrmStyle();
360 -
361 339 foreach ( $saved_forms as $form ) {
362 340 $new_form = array(
363 341 'form_id' => $form->id,
364 342 'description' => $form->description,
@@ -399,11 +377,8 @@
399 377 }
400 378
401 379 /**
402 380 * @since 3.06.04
403 - *
404 - * @param int|string $form_id Form ID.
405 - *
406 381 * @return int
407 382 */
408 383 private function form_field_count( $form_id ) {
409 384 global $wpdb;
@@ -420,11 +395,8 @@
420 395 }
421 396
422 397 /**
423 398 * @since 3.06.04
424 - *
425 - * @param int|string $form_id Form ID.
426 - *
427 399 * @return int
428 400 */
429 401 private function form_action_count( $form_id ) {
430 402 $args = array(
@@ -440,9 +412,8 @@
440 412 /**
441 413 * Get the last 100 fields created.
442 414 *
443 415 * @since 3.06.04
444 - *
445 416 * @return array
446 417 */
447 418 private function fields() {
448 419 $args = array(
@@ -449,10 +420,9 @@
449 420 'limit' => 50,
450 421 'order_by' => 'id DESC',
451 422 );
452 423
453 - $fields = FrmDb::get_results( 'frm_fields', array(), 'id, form_id, name, type, field_options', $args );
454 -
424 + $fields = FrmDb::get_results( 'frm_fields', array(), 'form_id, name, type, field_options', $args );
455 425 foreach ( $fields as $k => $field ) {
456 426 FrmAppHelper::unserialize_or_decode( $field->field_options );
457 427 $fields[ $k ]->field_options = json_encode( $field->field_options );
458 428 }
@@ -460,9 +430,8 @@
460 430 }
461 431
462 432 /**
463 433 * @since 3.06.04
464 - *
465 434 * @return array
466 435 */
467 436 private function actions() {
468 437 $args = array(
@@ -472,9 +441,8 @@
472 441
473 442 $actions = array();
474 443
475 444 $saved_actions = FrmDb::check_cache( json_encode( $args ), 'frm_actions', $args, 'get_posts' );
476 -
477 445 foreach ( $saved_actions as $action ) {
478 446 $actions[] = array(
479 447 'form_id' => $action->menu_order,
480 448 'type' => $action->post_excerpt,
@@ -487,9 +455,8 @@
487 455 }
488 456
489 457 /**
490 458 * @since 3.06.04
491 - *
492 459 * @return bool
493 460 */
494 461 private function tracking_allowed() {
495 462 return FrmUsageController::tracking_allowed();
@@ -496,11 +463,8 @@
496 463 }
497 464
498 465 /**
499 466 * @since 3.06.04
500 - *
501 - * @param mixed $value Value.
502 - *
503 467 * @return string
504 468 */
505 469 private function maybe_json( $value ) {
506 470 return is_array( $value ) ? json_encode( $value ) : $value;