PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 3.06.06
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v3.06.06
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 +9 -26 6.53.06.06 View file →
@@ -9,10 +9,8 @@
9 9 class FrmUsage {
10 10
11 11 /**
12 12 * @since 3.06.04
13 - *
14 - * @return void
15 13 */
16 14 public function send_snapshot() {
17 15 if ( ! $this->tracking_allowed() ) {
18 16 return;
@@ -18,9 +16,8 @@
18 16 return;
19 17 }
20 18
21 19 $ep = 'aHR0cHM6Ly9mcm0tdXNlci10cmFja2luZy5oZXJva3VhcHAuY29tL3NuYXBzaG90';
22 - // $ep = base64_encode( 'http://localhost:4567/snapshot' ); // Uncomment for testing
23 20 $body = json_encode( $this->snapshot() );
24 21
25 22 // Setup variable for wp_remote_request.
26 23 $post = array(
@@ -69,9 +66,9 @@
69 66 'admin_email' => '', // Let's keep it anonymous.
70 67 'wp_version' => $wp_version,
71 68 'php_version' => phpversion(),
72 69 'mysql_version' => $wpdb->db_version(),
73 - 'os' => FrmAppHelper::get_server_os(),
70 + 'os' => php_uname( 's' ),
74 71 'locale' => get_locale(),
75 72
76 73 'active_license' => FrmAppHelper::pro_is_installed(),
77 74 'form_count' => $form_counts->published,
@@ -77,9 +74,9 @@
77 74 'form_count' => $form_counts->published,
78 75 'entry_count' => FrmEntry::getRecordCount(),
79 76 'timestamp' => gmdate( 'c' ),
80 77
81 - 'theme_name' => is_object( $theme_data ) ? $theme_data->Name : '', // phpcs:ignore WordPress.NamingConventions
78 + 'theme_name' => $theme_data->Name, // phpcs:ignore WordPress.NamingConventions
82 79 'plugins' => $this->plugins(),
83 80 'settings' => array(
84 81 $this->settings(),
85 82 ),
@@ -95,9 +92,9 @@
95 92 * @since 3.06.04
96 93 * @return array
97 94 */
98 95 private function plugins() {
99 - $plugin_list = FrmAppHelper::get_plugins();
96 + $plugin_list = get_plugins();
100 97
101 98 $plugins = array();
102 99 foreach ( $plugin_list as $slug => $info ) {
103 100 $plugins[] = array(
@@ -125,8 +122,9 @@
125 122 );
126 123 $pass_settings = array(
127 124 'load_style',
128 125 'use_html',
126 + 'old_css',
129 127 'fade_form',
130 128 'jquery_css',
131 129 're_type',
132 130 're_lang',
@@ -135,9 +133,8 @@
135 133 'mu_menu',
136 134 'no_ips',
137 135 'btsp_css',
138 136 'btsp_errors',
139 - 'admin_bar',
140 137 );
141 138
142 139 foreach ( $pass_settings as $setting ) {
143 140 if ( isset( $settings_list->$setting ) ) {
@@ -156,13 +153,9 @@
156 153 /**
157 154 * Include the permissions settings for each capability.
158 155 *
159 156 * @since 3.06.04
160 - *
161 157 * @return array
162 - *
163 - * @param FrmSettings $settings_list
164 - * @return array
165 158 */
166 159 private function messages( $settings_list ) {
167 160 $messages = array(
168 161 'success_msg',
@@ -186,10 +179,8 @@
186 179 /**
187 180 * Include the permissions settings for each capability.
188 181 *
189 182 * @since 3.06.04
190 - *
191 - * @param FrmSettings $settings_list
192 183 * @return array
193 184 */
194 185 private function permissions( $settings_list ) {
195 186 $permissions = array();
@@ -221,10 +212,8 @@
221 212 $forms = array();
222 213 $settings = array(
223 214 'form_class',
224 215 'akismet',
225 - 'honeypot',
226 - 'antispam',
227 216 'custom_style',
228 217 'success_action',
229 218 'show_form',
230 219 'no_save',
@@ -242,9 +231,8 @@
242 231 'save_draft',
243 232 'draft_msg',
244 233 'submit_align',
245 234 'protect_files',
246 - 'protect_files_role',
247 235 'max_entries',
248 236 'open_status',
249 237 'closed_msg',
250 238 'open_date',
@@ -289,9 +277,9 @@
289 277 $join = $wpdb->prefix . 'frm_fields fi LEFT OUTER JOIN ' . $wpdb->prefix . 'frm_forms fo ON (fi.form_id=fo.id)';
290 278
291 279 $field_query = array(
292 280 'or' => 1,
293 - 'fi.form_id' => $form_id,
281 + 'form_id' => $form_id,
294 282 'parent_form_id' => $form_id,
295 283 );
296 284
297 285 return FrmDb::get_count( $join, $field_query );
@@ -307,9 +295,9 @@
307 295 'menu_order' => $form_id,
308 296 'fields' => 'ids',
309 297 );
310 298
311 - $actions = FrmDb::check_cache( json_encode( $args ), 'frm_actions', $args, 'get_posts' );
299 + $actions = FrmDb::check_cache( serialize( $args ), 'frm_actions', $args, 'get_posts' );
312 300 return count( $actions );
313 301 }
314 302
315 303 /**
@@ -319,18 +307,13 @@
319 307 * @return array
320 308 */
321 309 private function fields() {
322 310 $args = array(
323 - 'limit' => 50,
311 + 'limit' => 100,
324 312 'order_by' => 'id DESC',
325 313 );
326 314
327 - $fields = FrmDb::get_results( 'frm_fields', array(), 'form_id, name, type, field_options', $args );
328 - foreach ( $fields as $k => $field ) {
329 - FrmAppHelper::unserialize_or_decode( $field->field_options );
330 - $fields[ $k ]->field_options = json_encode( $field->field_options );
331 - }
332 - return $fields;
315 + return FrmDb::get_results( 'frm_fields', array(), 'form_id, name, type', $args );
333 316 }
334 317
335 318 /**
336 319 * @since 3.06.04
@@ -343,9 +326,9 @@
343 326 );
344 327
345 328 $actions = array();
346 329
347 - $saved_actions = FrmDb::check_cache( json_encode( $args ), 'frm_actions', $args, 'get_posts' );
330 + $saved_actions = FrmDb::check_cache( serialize( $args ), 'frm_actions', $args, 'get_posts' );
348 331 foreach ( $saved_actions as $action ) {
349 332 $actions[] = array(
350 333 'form_id' => $action->menu_order,
351 334 'type' => $action->post_excerpt,