PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.17
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.17
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 +3 -41 6.266.17 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(
@@ -271,14 +253,11 @@
271 253 'login_msg',
272 254 'admin_permission',
273 255 );
274 256
275 - $default = $settings_list->default_options();
276 -
277 257 $message_settings = array();
278 -
279 258 foreach ( $messages as $message ) {
280 - $message_settings[ 'changed-' . $message ] = $settings_list->$message === $default[ $message ] ? 0 : 1;
259 + $message_settings[ $message ] = $settings_list->$message;
281 260 }
282 261
283 262 return $message_settings;
284 263 }
@@ -288,9 +267,8 @@
288 267 *
289 268 * @since 3.06.04
290 269 *
291 270 * @param FrmSettings $settings_list
292 - *
293 271 * @return array
294 272 */
295 273 private function permissions( $settings_list ) {
296 274 $permissions = array();
@@ -306,9 +284,8 @@
306 284 }
307 285
308 286 /**
309 287 * @since 3.06.04
310 - *
311 288 * @return array
312 289 */
313 290 private function forms() {
314 291 $s_query = array(
@@ -323,10 +300,10 @@
323 300 $forms = array();
324 301 $settings = array(
325 302 'form_class',
326 303 'akismet',
304 + 'honeypot',
327 305 'antispam',
328 - 'stopforumspam',
329 306 'custom_style',
330 307 'success_action',
331 308 'show_form',
332 309 'no_save',
@@ -356,9 +333,8 @@
356 333 'submit_conditions',
357 334 );
358 335
359 336 $style = new FrmStyle();
360 -
361 337 foreach ( $saved_forms as $form ) {
362 338 $new_form = array(
363 339 'form_id' => $form->id,
364 340 'description' => $form->description,
@@ -399,11 +375,8 @@
399 375 }
400 376
401 377 /**
402 378 * @since 3.06.04
403 - *
404 - * @param int|string $form_id Form ID.
405 - *
406 379 * @return int
407 380 */
408 381 private function form_field_count( $form_id ) {
409 382 global $wpdb;
@@ -420,11 +393,8 @@
420 393 }
421 394
422 395 /**
423 396 * @since 3.06.04
424 - *
425 - * @param int|string $form_id Form ID.
426 - *
427 397 * @return int
428 398 */
429 399 private function form_action_count( $form_id ) {
430 400 $args = array(
@@ -440,9 +410,8 @@
440 410 /**
441 411 * Get the last 100 fields created.
442 412 *
443 413 * @since 3.06.04
444 - *
445 414 * @return array
446 415 */
447 416 private function fields() {
448 417 $args = array(
@@ -449,10 +418,9 @@
449 418 'limit' => 50,
450 419 'order_by' => 'id DESC',
451 420 );
452 421
453 - $fields = FrmDb::get_results( 'frm_fields', array(), 'id, form_id, name, type, field_options', $args );
454 -
422 + $fields = FrmDb::get_results( 'frm_fields', array(), 'form_id, name, type, field_options', $args );
455 423 foreach ( $fields as $k => $field ) {
456 424 FrmAppHelper::unserialize_or_decode( $field->field_options );
457 425 $fields[ $k ]->field_options = json_encode( $field->field_options );
458 426 }
@@ -460,9 +428,8 @@
460 428 }
461 429
462 430 /**
463 431 * @since 3.06.04
464 - *
465 432 * @return array
466 433 */
467 434 private function actions() {
468 435 $args = array(
@@ -472,9 +439,8 @@
472 439
473 440 $actions = array();
474 441
475 442 $saved_actions = FrmDb::check_cache( json_encode( $args ), 'frm_actions', $args, 'get_posts' );
476 -
477 443 foreach ( $saved_actions as $action ) {
478 444 $actions[] = array(
479 445 'form_id' => $action->menu_order,
480 446 'type' => $action->post_excerpt,
@@ -487,9 +453,8 @@
487 453 }
488 454
489 455 /**
490 456 * @since 3.06.04
491 - *
492 457 * @return bool
493 458 */
494 459 private function tracking_allowed() {
495 460 return FrmUsageController::tracking_allowed();
@@ -496,11 +461,8 @@
496 461 }
497 462
498 463 /**
499 464 * @since 3.06.04
500 - *
501 - * @param mixed $value Value.
502 - *
503 465 * @return string
504 466 */
505 467 private function maybe_json( $value ) {
506 468 return is_array( $value ) ? json_encode( $value ) : $value;