PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.23
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.23
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 +0 -31 6.266.23 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();
@@ -233,9 +222,8 @@
233 222 'active_captcha',
234 223 'honeypot',
235 224 'wp_spam_check',
236 225 'denylist_check',
237 - 'email_style',
238 226 );
239 227
240 228 foreach ( $pass_settings as $setting ) {
241 229 if ( isset( $settings_list->$setting ) ) {
@@ -256,9 +244,8 @@
256 244 *
257 245 * @since 3.06.04
258 246 *
259 247 * @param FrmSettings $settings_list
260 - *
261 248 * @return array
262 249 */
263 250 private function messages( $settings_list ) {
264 251 $messages = array(
@@ -274,9 +261,8 @@
274 261
275 262 $default = $settings_list->default_options();
276 263
277 264 $message_settings = array();
278 -
279 265 foreach ( $messages as $message ) {
280 266 $message_settings[ 'changed-' . $message ] = $settings_list->$message === $default[ $message ] ? 0 : 1;
281 267 }
282 268
@@ -288,9 +274,8 @@
288 274 *
289 275 * @since 3.06.04
290 276 *
291 277 * @param FrmSettings $settings_list
292 - *
293 278 * @return array
294 279 */
295 280 private function permissions( $settings_list ) {
296 281 $permissions = array();
@@ -306,9 +291,8 @@
306 291 }
307 292
308 293 /**
309 294 * @since 3.06.04
310 - *
311 295 * @return array
312 296 */
313 297 private function forms() {
314 298 $s_query = array(
@@ -356,9 +340,8 @@
356 340 'submit_conditions',
357 341 );
358 342
359 343 $style = new FrmStyle();
360 -
361 344 foreach ( $saved_forms as $form ) {
362 345 $new_form = array(
363 346 'form_id' => $form->id,
364 347 'description' => $form->description,
@@ -399,11 +382,8 @@
399 382 }
400 383
401 384 /**
402 385 * @since 3.06.04
403 - *
404 - * @param int|string $form_id Form ID.
405 - *
406 386 * @return int
407 387 */
408 388 private function form_field_count( $form_id ) {
409 389 global $wpdb;
@@ -420,11 +400,8 @@
420 400 }
421 401
422 402 /**
423 403 * @since 3.06.04
424 - *
425 - * @param int|string $form_id Form ID.
426 - *
427 404 * @return int
428 405 */
429 406 private function form_action_count( $form_id ) {
430 407 $args = array(
@@ -440,9 +417,8 @@
440 417 /**
441 418 * Get the last 100 fields created.
442 419 *
443 420 * @since 3.06.04
444 - *
445 421 * @return array
446 422 */
447 423 private function fields() {
448 424 $args = array(
@@ -450,9 +426,8 @@
450 426 'order_by' => 'id DESC',
451 427 );
452 428
453 429 $fields = FrmDb::get_results( 'frm_fields', array(), 'id, form_id, name, type, field_options', $args );
454 -
455 430 foreach ( $fields as $k => $field ) {
456 431 FrmAppHelper::unserialize_or_decode( $field->field_options );
457 432 $fields[ $k ]->field_options = json_encode( $field->field_options );
458 433 }
@@ -460,9 +435,8 @@
460 435 }
461 436
462 437 /**
463 438 * @since 3.06.04
464 - *
465 439 * @return array
466 440 */
467 441 private function actions() {
468 442 $args = array(
@@ -472,9 +446,8 @@
472 446
473 447 $actions = array();
474 448
475 449 $saved_actions = FrmDb::check_cache( json_encode( $args ), 'frm_actions', $args, 'get_posts' );
476 -
477 450 foreach ( $saved_actions as $action ) {
478 451 $actions[] = array(
479 452 'form_id' => $action->menu_order,
480 453 'type' => $action->post_excerpt,
@@ -487,9 +460,8 @@
487 460 }
488 461
489 462 /**
490 463 * @since 3.06.04
491 - *
492 464 * @return bool
493 465 */
494 466 private function tracking_allowed() {
495 467 return FrmUsageController::tracking_allowed();
@@ -496,11 +468,8 @@
496 468 }
497 469
498 470 /**
499 471 * @since 3.06.04
500 - *
501 - * @param mixed $value Value.
502 - *
503 472 * @return string
504 473 */
505 474 private function maybe_json( $value ) {
506 475 return is_array( $value ) ? json_encode( $value ) : $value;