PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.20
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.20
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 +1 -35 6.26.16.20 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();
@@ -230,12 +219,8 @@
230 219 'btsp_version',
231 220 'admin_bar',
232 221 'summary_emails',
233 222 'active_captcha',
234 - 'honeypot',
235 - 'wp_spam_check',
236 - 'denylist_check',
237 - 'email_style',
238 223 );
239 224
240 225 foreach ( $pass_settings as $setting ) {
241 226 if ( isset( $settings_list->$setting ) ) {
@@ -256,9 +241,8 @@
256 241 *
257 242 * @since 3.06.04
258 243 *
259 244 * @param FrmSettings $settings_list
260 - *
261 245 * @return array
262 246 */
263 247 private function messages( $settings_list ) {
264 248 $messages = array(
@@ -274,9 +258,8 @@
274 258
275 259 $default = $settings_list->default_options();
276 260
277 261 $message_settings = array();
278 -
279 262 foreach ( $messages as $message ) {
280 263 $message_settings[ 'changed-' . $message ] = $settings_list->$message === $default[ $message ] ? 0 : 1;
281 264 }
282 265
@@ -288,9 +271,8 @@
288 271 *
289 272 * @since 3.06.04
290 273 *
291 274 * @param FrmSettings $settings_list
292 - *
293 275 * @return array
294 276 */
295 277 private function permissions( $settings_list ) {
296 278 $permissions = array();
@@ -306,9 +288,8 @@
306 288 }
307 289
308 290 /**
309 291 * @since 3.06.04
310 - *
311 292 * @return array
312 293 */
313 294 private function forms() {
314 295 $s_query = array(
@@ -323,10 +304,10 @@
323 304 $forms = array();
324 305 $settings = array(
325 306 'form_class',
326 307 'akismet',
308 + 'honeypot',
327 309 'antispam',
328 - 'stopforumspam',
329 310 'custom_style',
330 311 'success_action',
331 312 'show_form',
332 313 'no_save',
@@ -356,9 +337,8 @@
356 337 'submit_conditions',
357 338 );
358 339
359 340 $style = new FrmStyle();
360 -
361 341 foreach ( $saved_forms as $form ) {
362 342 $new_form = array(
363 343 'form_id' => $form->id,
364 344 'description' => $form->description,
@@ -399,11 +379,8 @@
399 379 }
400 380
401 381 /**
402 382 * @since 3.06.04
403 - *
404 - * @param int|string $form_id Form ID.
405 - *
406 383 * @return int
407 384 */
408 385 private function form_field_count( $form_id ) {
409 386 global $wpdb;
@@ -420,11 +397,8 @@
420 397 }
421 398
422 399 /**
423 400 * @since 3.06.04
424 - *
425 - * @param int|string $form_id Form ID.
426 - *
427 401 * @return int
428 402 */
429 403 private function form_action_count( $form_id ) {
430 404 $args = array(
@@ -440,9 +414,8 @@
440 414 /**
441 415 * Get the last 100 fields created.
442 416 *
443 417 * @since 3.06.04
444 - *
445 418 * @return array
446 419 */
447 420 private function fields() {
448 421 $args = array(
@@ -450,9 +423,8 @@
450 423 'order_by' => 'id DESC',
451 424 );
452 425
453 426 $fields = FrmDb::get_results( 'frm_fields', array(), 'id, form_id, name, type, field_options', $args );
454 -
455 427 foreach ( $fields as $k => $field ) {
456 428 FrmAppHelper::unserialize_or_decode( $field->field_options );
457 429 $fields[ $k ]->field_options = json_encode( $field->field_options );
458 430 }
@@ -460,9 +432,8 @@
460 432 }
461 433
462 434 /**
463 435 * @since 3.06.04
464 - *
465 436 * @return array
466 437 */
467 438 private function actions() {
468 439 $args = array(
@@ -472,9 +443,8 @@
472 443
473 444 $actions = array();
474 445
475 446 $saved_actions = FrmDb::check_cache( json_encode( $args ), 'frm_actions', $args, 'get_posts' );
476 -
477 447 foreach ( $saved_actions as $action ) {
478 448 $actions[] = array(
479 449 'form_id' => $action->menu_order,
480 450 'type' => $action->post_excerpt,
@@ -487,9 +457,8 @@
487 457 }
488 458
489 459 /**
490 460 * @since 3.06.04
491 - *
492 461 * @return bool
493 462 */
494 463 private function tracking_allowed() {
495 464 return FrmUsageController::tracking_allowed();
@@ -496,11 +465,8 @@
496 465 }
497 466
498 467 /**
499 468 * @since 3.06.04
500 - *
501 - * @param mixed $value Value.
502 - *
503 469 * @return string
504 470 */
505 471 private function maybe_json( $value ) {
506 472 return is_array( $value ) ? json_encode( $value ) : $value;