PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.13
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.13
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 +40 -40 6.3.16.13 View file →
@@ -17,21 +17,21 @@
17 17 if ( ! $this->tracking_allowed() ) {
18 18 return;
19 19 }
20 20
21 - $ep = 'aHR0cHM6Ly9mcm0tdXNlci10cmFja2luZy5oZXJva3VhcHAuY29tL3NuYXBzaG90';
21 + $ep = 'aHR0cHM6Ly91c2FnZS5mb3JtaWRhYmxlZm9ybXMuY29tL2FwcC9zbmFwc2hvdAo=';
22 22 // $ep = base64_encode( 'http://localhost:4567/snapshot' ); // Uncomment for testing
23 23 $body = json_encode( $this->snapshot() );
24 24
25 25 // Setup variable for wp_remote_request.
26 26 $post = array(
27 - 'method' => 'POST',
28 - 'headers' => array(
27 + 'method' => 'POST',
28 + 'headers' => array(
29 29 'Accept' => 'application/json',
30 30 'Content-Type' => 'application/json',
31 31 'Content-Length' => strlen( $body ),
32 32 ),
33 - 'body' => $body,
33 + 'body' => $body,
34 34 );
35 35
36 36 wp_remote_request( base64_decode( $ep ), $post );
37 37 }
@@ -64,29 +64,32 @@
64 64 $theme_data = wp_get_theme();
65 65 $form_counts = FrmForm::get_count();
66 66
67 67 $snap = array(
68 - 'uuid' => $this->uuid(),
69 - 'admin_email' => '', // Let's keep it anonymous.
70 - 'wp_version' => $wp_version,
71 - 'php_version' => phpversion(),
72 - 'mysql_version' => $wpdb->db_version(),
73 - 'os' => php_uname( 's' ),
74 - 'locale' => get_locale(),
68 + 'uuid' => $this->uuid(),
69 + // Let's keep it anonymous.
70 + 'admin_email' => '',
71 + 'wp_version' => $wp_version,
72 + 'php_version' => phpversion(),
73 + 'mysql_version' => $wpdb->db_version(),
74 + 'os' => FrmAppHelper::get_server_os(),
75 + 'locale' => get_locale(),
75 76
76 - 'active_license' => FrmAppHelper::pro_is_installed(),
77 - 'form_count' => $form_counts->published,
78 - 'entry_count' => FrmEntry::getRecordCount(),
79 - 'timestamp' => gmdate( 'c' ),
77 + 'active_license' => FrmAppHelper::pro_is_installed(),
78 + 'form_count' => $form_counts->published,
79 + 'entry_count' => FrmEntry::getRecordCount(),
80 + 'timestamp' => gmdate( 'c' ),
80 81
81 - 'theme_name' => is_object( $theme_data ) ? $theme_data->Name : '', // phpcs:ignore WordPress.NamingConventions
82 - 'plugins' => $this->plugins(),
83 - 'settings' => array(
82 + 'theme_name' => is_object( $theme_data ) ? $theme_data->Name : '', // phpcs:ignore WordPress.NamingConventions
83 + 'plugins' => $this->plugins(),
84 + 'settings' => array(
84 85 $this->settings(),
85 86 ),
86 - 'forms' => $this->forms(),
87 - 'fields' => $this->fields(),
88 - 'actions' => $this->actions(),
87 + 'forms' => $this->forms(),
88 + 'fields' => $this->fields(),
89 + 'actions' => $this->actions(),
90 +
91 + 'onboarding-wizard' => FrmOnboardingWizardController::get_usage_data(),
89 92 );
90 93
91 94 return apply_filters( 'frm_usage_snapshot', $snap );
92 95 }
@@ -100,12 +103,12 @@
100 103
101 104 $plugins = array();
102 105 foreach ( $plugin_list as $slug => $info ) {
103 106 $plugins[] = array(
104 - 'name' => $info['Name'],
105 - 'slug' => $slug,
106 - 'version' => $info['Version'],
107 - 'active' => is_plugin_active( $slug ),
107 + 'name' => $info['Name'],
108 + 'slug' => $slug,
109 + 'version' => $info['Version'],
110 + 'active' => is_plugin_active( $slug ),
108 111 );
109 112 }
110 113
111 114 return $plugins;
@@ -117,10 +120,10 @@
117 120 * @since 3.06.04
118 121 * @return array
119 122 */
120 123 private function settings() {
121 - $settings_list = FrmAppHelper::get_settings();
122 - $settings = array(
124 + $settings_list = FrmAppHelper::get_settings();
125 + $settings = array(
123 126 'messages' => $this->messages( $settings_list ),
124 127 'permissions' => $this->permissions( $settings_list ),
125 128 );
126 129 $pass_settings = array(
@@ -157,10 +160,8 @@
157 160 * Include the permissions settings for each capability.
158 161 *
159 162 * @since 3.06.04
160 163 *
161 - * @return array
162 - *
163 164 * @param FrmSettings $settings_list
164 165 * @return array
165 166 */
166 167 private function messages( $settings_list ) {
@@ -210,10 +211,10 @@
210 211 */
211 212 private function forms() {
212 213 $s_query = array(
213 214 array(
214 - 'or' => 1,
215 - 'parent_form_id' => null,
215 + 'or' => 1,
216 + 'parent_form_id' => null,
216 217 'parent_form_id <' => 1,
217 218 ),
218 219 );
219 220
@@ -255,15 +256,15 @@
255 256 );
256 257
257 258 foreach ( $saved_forms as $form ) {
258 259 $new_form = array(
259 - 'form_id' => $form->id,
260 - 'description' => $form->description,
261 - 'logged_in' => $form->logged_in,
262 - 'editable' => $form->editable,
263 - 'is_template' => $form->is_template,
264 - 'entry_count' => FrmEntry::getRecordCount( $form->id ),
265 - 'field_count' => $this->form_field_count( $form->id ),
260 + 'form_id' => $form->id,
261 + 'description' => $form->description,
262 + 'logged_in' => $form->logged_in,
263 + 'editable' => $form->editable,
264 + 'is_template' => $form->is_template,
265 + 'entry_count' => FrmEntry::getRecordCount( $form->id ),
266 + 'field_count' => $this->form_field_count( $form->id ),
266 267 'form_action_count' => $this->form_action_count( $form->id ),
267 268 );
268 269
269 270 foreach ( $settings as $setting ) {
@@ -318,9 +319,9 @@
318 319 * @since 3.06.04
319 320 * @return array
320 321 */
321 322 private function fields() {
322 - $args = array(
323 + $args = array(
323 324 'limit' => 50,
324 325 'order_by' => 'id DESC',
325 326 );
326 327
@@ -373,5 +374,4 @@
373 374 private function maybe_json( $value ) {
374 375 return is_array( $value ) ? json_encode( $value ) : $value;
375 376 }
376 377 }
377 -