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/controllers/FrmEntriesController.php +16 -205 6.266.23 View file →
@@ -4,11 +4,8 @@
4 4 }
5 5
6 6 class FrmEntriesController {
7 7
8 - /**
9 - * @return void
10 - */
11 8 public static function menu() {
12 9 FrmAppHelper::force_capability( 'frm_view_entries' );
13 10
14 11 add_submenu_page( 'formidable', 'Formidable | ' . __( 'Entries', 'formidable' ), __( 'Entries', 'formidable' ), 'frm_view_entries', 'formidable-entries', 'FrmEntriesController::route' );
@@ -13,9 +10,8 @@
13 10
14 11 add_submenu_page( 'formidable', 'Formidable | ' . __( 'Entries', 'formidable' ), __( 'Entries', 'formidable' ), 'frm_view_entries', 'formidable-entries', 'FrmEntriesController::route' );
15 12
16 13 $views_installed = is_callable( 'FrmProAppHelper::views_is_installed' ) && FrmProAppHelper::views_is_installed();
17 -
18 14 if ( ! $views_installed ) {
19 15 add_submenu_page( 'formidable', 'Formidable | ' . __( 'Views', 'formidable' ), __( 'Views', 'formidable' ), 'frm_view_entries', 'formidable-views', 'FrmFormsController::no_views' );
20 16 self::maybe_redirect_to_views_upsell();
21 17 } else {
@@ -61,9 +57,8 @@
61 57 * @return void
62 58 */
63 59 private static function maybe_redirect_to_views_upsell() {
64 60 global $pagenow;
65 -
66 61 if ( 'edit.php' !== $pagenow || 'frm_display' !== FrmAppHelper::simple_get( 'post_type' ) ) {
67 62 return;
68 63 }
69 64
@@ -79,9 +74,8 @@
79 74 /**
80 75 * @since 6.14.1
81 76 *
82 77 * @param array $query_args
83 - *
84 78 * @return array
85 79 */
86 80 private static function add_url_params_to_views_redirect_query_args( $query_args ) {
87 81 $query_args['show_nav'] = FrmAppHelper::simple_get( 'show_nav', 'absint', 0 );
@@ -86,9 +80,8 @@
86 80 private static function add_url_params_to_views_redirect_query_args( $query_args ) {
87 81 $query_args['show_nav'] = FrmAppHelper::simple_get( 'show_nav', 'absint', 0 );
88 82
89 83 $form_id = FrmAppHelper::simple_get( 'form', 'absint', 0 );
90 -
91 84 if ( $form_id ) {
92 85 $query_args['form'] = $form_id;
93 86 }
94 87
@@ -96,10 +89,8 @@
96 89 }
97 90
98 91 /**
99 92 * @since 2.05.07
100 - *
101 - * @return void
102 93 */
103 94 private static function load_manage_entries_hooks() {
104 95 if ( ! in_array( FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ), array( 'edit', 'show', 'new', 'duplicate' ), true ) ) {
105 96 $menu_name = FrmAppHelper::get_menu_name();
@@ -108,16 +99,14 @@
108 99 add_filter( 'manage_' . $base . '_columns', 'FrmEntriesController::manage_columns' );
109 100 add_filter( 'get_user_option_' . self::hidden_column_key( $menu_name ), 'FrmEntriesController::hidden_columns' );
110 101 add_filter( 'manage_' . $base . '_sortable_columns', 'FrmEntriesController::sortable_columns' );
111 102 } else {
112 - add_filter( 'screen_options_show_screen', self::class . '::remove_screen_options', 10, 2 );
103 + add_filter( 'screen_options_show_screen', __CLASS__ . '::remove_screen_options', 10, 2 );
113 104 }
114 105 }
115 106
116 107 /**
117 108 * Display in Back End.
118 - *
119 - * @return mixed
120 109 */
121 110 public static function route() {
122 111 $action = FrmAppHelper::get_param( 'frm_action', '', 'get', 'sanitize_title' );
123 112 FrmAppHelper::include_svg();
@@ -128,15 +117,13 @@
128 117 return self::$action();
129 118
130 119 default:
131 120 do_action( 'frm_entry_action_route', $action );
132 -
133 121 if ( apply_filters( 'frm_entry_stop_action_route', false, $action ) ) {
134 122 return;
135 123 }
136 124
137 - self::display_list();
138 - return;
125 + return self::display_list();
139 126 }
140 127 }
141 128
142 129 /**
@@ -143,13 +130,8 @@
143 130 * Prevent the "screen options" tab from showing when
144 131 * editing or creating an entry
145 132 *
146 133 * @since 3.0
147 - *
148 - * @param bool $show_screen Whether to show the screen options tab.
149 - * @param object $screen The current screen object.
150 - *
151 - * @return bool
152 134 */
153 135 public static function remove_screen_options( $show_screen, $screen ) {
154 136 $menu_name = sanitize_title( FrmAppHelper::get_menu_name() );
155 137 $unread_count = FrmEntriesHelper::get_visible_unread_inbox_count();
@@ -160,13 +142,8 @@
160 142
161 143 return $show_screen;
162 144 }
163 145
164 - /**
165 - * @param array $columns
166 - *
167 - * @return array
168 - */
169 146 public static function manage_columns( $columns ) {
170 147 global $frm_vars;
171 148 $form_id = FrmForm::get_current_form_id();
172 149
@@ -188,9 +165,8 @@
188 165
189 166 $frm_vars['cols'] = $columns;
190 167
191 168 $action = FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' );
192 -
193 169 if ( FrmAppHelper::is_admin_page( 'formidable-entries' ) && in_array( $action, array( '', 'list', 'destroy' ) ) ) {
194 170 add_screen_option(
195 171 'per_page',
196 172 array(
@@ -203,14 +179,8 @@
203 179
204 180 return $columns;
205 181 }
206 182
207 - /**
208 - * @param int|string $form_id
209 - * @param array $columns
210 - *
211 - * @return void
212 - */
213 183 private static function get_columns_for_form( $form_id, &$columns ) {
214 184 $form_cols = FrmField::get_all_for_form( $form_id, '', 'include' );
215 185
216 186 /**
@@ -228,9 +198,8 @@
228 198 continue;
229 199 }
230 200
231 201 $has_child_fields = $form_col->type === 'form' && ! empty( $form_col->field_options['form_select'] );
232 -
233 202 if ( $has_child_fields ) {
234 203 self::add_subform_cols( $form_col, $form_id, $columns );
235 204 } else {
236 205 self::add_field_cols( $form_col, $form_id, $columns );
@@ -239,18 +208,11 @@
239 208 }
240 209
241 210 /**
242 211 * @since 3.01
243 - *
244 - * @param object $field The field object.
245 - * @param int|string $form_id The form ID.
246 - * @param array $columns The columns array.
247 - *
248 - * @return void
249 212 */
250 213 private static function add_subform_cols( $field, $form_id, &$columns ) {
251 214 $sub_form_cols = FrmField::get_all_for_form( $field->field_options['form_select'] );
252 -
253 215 if ( empty( $sub_form_cols ) ) {
254 216 return;
255 217 }
256 218
@@ -265,62 +227,24 @@
265 227 }
266 228
267 229 /**
268 230 * @since 3.01
269 - *
270 - * @param object $field The field object.
271 - * @param int|string $form_id The form ID.
272 - * @param array $columns The columns array.
273 - *
274 - * @return void
275 231 */
276 232 private static function add_field_cols( $field, $form_id, &$columns ) {
277 233 $col_id = $field->field_key;
278 -
279 234 if ( $field->form_id != $form_id ) {
280 235 $col_id .= '-_-form' . $field->form_id;
281 236 }
282 237
283 - $has_separate_value = ! FrmField::is_option_empty( $field, 'separate_value' );
284 - $is_post_status = FrmField::is_option_true( $field, 'post_field' ) && $field->field_options['post_field'] === 'post_status';
285 - $include_column_for_sep_val = $has_separate_value && ! $is_post_status;
286 -
287 - if ( $include_column_for_sep_val ) {
288 - $columns[ $form_id . '_frmsep_' . $col_id ] = self::maybe_format_field_name_for_column_title( $field, $include_column_for_sep_val );
238 + $has_separate_value = ! FrmField::is_option_empty( $field, 'separate_value' );
239 + $is_post_status = FrmField::is_option_true( $field, 'post_field' ) && $field->field_options['post_field'] === 'post_status';
240 + if ( $has_separate_value && ! $is_post_status ) {
241 + $columns[ $form_id . '_frmsep_' . $col_id ] = FrmAppHelper::truncate( $field->name, 35 );
289 242 }
290 243
291 - $columns[ $form_id . '_' . $col_id ] = self::maybe_format_field_name_for_column_title( $field, $include_column_for_sep_val, false );
244 + $columns[ $form_id . '_' . $col_id ] = FrmAppHelper::truncate( $field->name, 35 );
292 245 }
293 246
294 - /**
295 - * Appends "(Value)" or "(Label)" to the field name if it's an option field that has a separate value/label.
296 - *
297 - * @since 6.25.1
298 - *
299 - * @param object $field
300 - * @param bool $include_column_for_sep_val
301 - * @param bool $is_value
302 - *
303 - * @return string
304 - */
305 - private static function maybe_format_field_name_for_column_title( $field, $include_column_for_sep_val, $is_value = true ) {
306 - $field_name = FrmAppHelper::truncate( $field->name, 35 );
307 -
308 - if ( ! $include_column_for_sep_val || ! in_array( $field->type, array( 'select', 'radio', 'checkbox' ), true ) ) {
309 - return $field_name;
310 - }
311 -
312 - $append_text = $is_value ? esc_html__( 'value', 'formidable' ) : esc_html__( 'label', 'formidable' );
313 -
314 - return sprintf( '%s (%s)', $field_name, $append_text );
315 - }
316 -
317 - /**
318 - * @param int|string $form_id The form ID.
319 - * @param array $columns The columns array.
320 - *
321 - * @return void
322 - */
323 247 private static function maybe_add_ip_col( $form_id, &$columns ) {
324 248 if ( FrmAppHelper::ips_saved() ) {
325 249 $columns[ $form_id . '_ip' ] = 'IP';
326 250 }
@@ -325,20 +249,10 @@
325 249 $columns[ $form_id . '_ip' ] = 'IP';
326 250 }
327 251 }
328 252
329 - /**
330 - * @param bool $check The check value.
331 - * @param int $object_id The object ID.
332 - * @param string $meta_key The meta key.
333 - * @param mixed $meta_value The meta value.
334 - * @param mixed $prev_value The previous value.
335 - *
336 - * @return bool
337 - */
338 253 public static function check_hidden_cols( $check, $object_id, $meta_key, $meta_value, $prev_value ) {
339 254 $this_page_name = self::hidden_column_key();
340 -
341 255 if ( $meta_key != $this_page_name || $meta_value == $prev_value ) {
342 256 return $check;
343 257 }
344 258
@@ -354,25 +268,16 @@
354 268 }
355 269
356 270 /**
357 271 * Add hidden columns back from other forms
358 - *
359 - * @param int $meta_id The meta ID.
360 - * @param int $object_id The object ID.
361 - * @param string $meta_key The meta key.
362 - * @param array $meta_value The meta value.
363 - *
364 - * @return void
365 272 */
366 273 public static function update_hidden_cols( $meta_id, $object_id, $meta_key, $meta_value ) {
367 274 $this_page_name = self::hidden_column_key();
368 -
369 275 if ( $meta_key != $this_page_name ) {
370 276 return;
371 277 }
372 278
373 279 global $frm_vars;
374 -
375 280 if ( ! isset( $frm_vars['prev_hidden_cols'] ) || ! $frm_vars['prev_hidden_cols'] ) {
376 281 // Don't continue if there's no previous value.
377 282 return;
378 283 }
@@ -396,10 +301,9 @@
396 301 }
397 302
398 303 $form_prefix = explode( '_', $prev_hidden );
399 304 $form_prefix = $form_prefix[0];
400 -
401 - if ( $form_prefix === $cur_form_prefix ) {
305 + if ( $form_prefix == $cur_form_prefix ) {
402 306 // Don't add back columns that are meant to be hidden.
403 307 continue;
404 308 }
405 309
@@ -415,12 +319,8 @@
415 319 }
416 320
417 321 /**
418 322 * @since 2.05.07
419 - *
420 - * @param string $menu_name
421 - *
422 - * @return string
423 323 */
424 324 private static function hidden_column_key( $menu_name = '' ) {
425 325 $base = self::base_column_key( $menu_name );
426 326
@@ -428,12 +328,8 @@
428 328 }
429 329
430 330 /**
431 331 * @since 2.05.07
432 - *
433 - * @param string $menu_name
434 - *
435 - * @return string
436 332 */
437 333 private static function base_column_key( $menu_name = '' ) {
438 334 if ( empty( $menu_name ) ) {
439 335 $menu_name = FrmAppHelper::get_menu_name();
@@ -443,15 +339,8 @@
443 339
444 340 return sanitize_title( $menu_name ) . ( $unread_count ? '-' . $unread_count : '' ) . '_page_formidable-entries';
445 341 }
446 342
447 - /**
448 - * @param int $save
449 - * @param string $option
450 - * @param string $value
451 - *
452 - * @return int
453 - */
454 343 public static function save_per_page( $save, $option, $value ) {
455 344 if ( $option === 'formidable_page_formidable_entries_per_page' ) {
456 345 $save = (int) $value;
457 346 }
@@ -458,11 +347,8 @@
458 347
459 348 return $save;
460 349 }
461 350
462 - /**
463 - * @return array
464 - */
465 351 public static function sortable_columns() {
466 352 $form_id = FrmForm::get_current_form_id();
467 353 $fields = FrmField::get_all_for_form( $form_id );
468 354
@@ -494,9 +380,8 @@
494 380 * Can't sort on checkboxes because they are sorted serialized.
495 381 * Some post content can be sorted but not everything.
496 382 *
497 383 * @param stdClass $field
498 - *
499 384 * @return bool
500 385 */
501 386 private static function field_supports_sorting( $field ) {
502 387 $is_sortable = 'checkbox' !== $field->type && empty( $field->field_options['post_field'] );
@@ -504,14 +389,11 @@
504 389 }
505 390
506 391 /**
507 392 * @param mixed $result Option value from database for hidden columns in entries table.
508 - *
509 393 * @return array
510 394 */
511 395 public static function hidden_columns( $result ) {
512 - global $frm_vars;
513 -
514 396 if ( ! is_array( $result ) ) {
515 397 // Force an unexpected value to be an array.
516 398 // Since $result is a filtered option and gets saved to the database, it's possible it could be a string.
517 399 // Since this code expects an array it would break with a "Uncaught Error: [] operator not supported for strings" error.
@@ -517,11 +399,15 @@
517 399 // Since this code expects an array it would break with a "Uncaught Error: [] operator not supported for strings" error.
518 400 $result = array();
519 401 }
520 402
521 - $form_id = FrmForm::get_current_form_id();
522 - $hidden = self::user_hidden_columns_for_form( $form_id, $result );
523 - $i = isset( $frm_vars['cols'] ) ? count( $frm_vars['cols'] ) : 0;
403 + $form_id = FrmForm::get_current_form_id();
404 +
405 + $hidden = self::user_hidden_columns_for_form( $form_id, $result );
406 +
407 + global $frm_vars;
408 + $i = isset( $frm_vars['cols'] ) ? count( $frm_vars['cols'] ) : 0;
409 +
524 410 $max_columns = 11;
525 411
526 412 if ( ! empty( $hidden ) ) {
527 413 $result = $hidden;
@@ -538,17 +424,11 @@
538 424 }
539 425
540 426 /**
541 427 * @since 2.05.07
542 - *
543 - * @param int|string $form_id
544 - * @param mixed $result
545 - *
546 - * @return array
547 428 */
548 429 private static function user_hidden_columns_for_form( $form_id, $result ) {
549 430 $hidden = array();
550 -
551 431 foreach ( (array) $result as $r ) {
552 432 if ( ! empty( $r ) ) {
553 433 list( $form_prefix, $field_key ) = explode( '_', $r );
554 434
@@ -566,13 +446,8 @@
566 446 /**
567 447 * Remove some columns by default when there are too many
568 448 *
569 449 * @since 2.05.07
570 - *
571 - * @param array $atts
572 - * @param array $result
573 - *
574 - * @return void
575 450 */
576 451 private static function remove_excess_cols( $atts, &$result ) {
577 452 global $frm_vars;
578 453
@@ -597,14 +472,8 @@
597 472 unset( $col_key, $col );
598 473 }
599 474 }
600 475
601 - /**
602 - * @param string $message
603 - * @param array $errors
604 - *
605 - * @return void
606 - */
607 476 public static function display_list( $message = '', $errors = array() ) {
608 477 global $wpdb, $frm_vars;
609 478
610 479 $form = FrmForm::maybe_get_current_form();
@@ -625,12 +494,10 @@
625 494
626 495 $wp_list_table->prepare_items();
627 496
628 497 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
629 -
630 498 if ( $pagenum > $total_pages && $total_pages > 0 ) {
631 499 $url = add_query_arg( 'paged', $total_pages );
632 -
633 500 if ( headers_sent() ) {
634 501 FrmAppHelper::js_redirect( $url, true );
635 502 } else {
636 503 wp_redirect( esc_url_raw( $url ) );
@@ -644,18 +511,12 @@
644 511
645 512 require FrmAppHelper::plugin_path() . '/classes/views/frm-entries/list.php';
646 513 }
647 514
648 - /**
649 - * @param object $form
650 - * @param array $errors
651 - *
652 - * @return void
653 - */
654 515 private static function get_delete_form_time( $form, &$errors ) {
655 516 if ( 'trash' === $form->status ) {
656 517 $delete_timestamp = time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS );
657 - $time_to_delete = FrmAppHelper::human_time_diff( $delete_timestamp, ( $form->options['trash_time'] ?? time() ) );
518 + $time_to_delete = FrmAppHelper::human_time_diff( $delete_timestamp, ( isset( $form->options['trash_time'] ) ? $form->options['trash_time'] : time() ) );
658 519
659 520 /* translators: %1$s: Time string */
660 521 $errors['trash'] = sprintf( __( 'This form is in the trash and is scheduled to be deleted permanently in %s along with any entries.', 'formidable' ), $time_to_delete );
661 522 }
@@ -662,12 +523,8 @@
662 523 }
663 524
664 525 /**
665 526 * Back End CRUD.
666 - *
667 - * @param int $id
668 - *
669 - * @return void
670 527 */
671 528 public static function show( $id = 0 ) {
672 529 FrmAppHelper::permission_check( 'frm_view_entries' );
673 530
@@ -679,9 +536,8 @@
679 536 }
680 537 }
681 538
682 539 $entry = FrmEntry::getOne( $id, true );
683 -
684 540 if ( ! $entry ) {
685 541 FrmAppController::show_error_modal(
686 542 array(
687 543 'title' => __( 'You can\'t view the entry', 'formidable' ),
@@ -692,9 +548,8 @@
692 548 return;
693 549 }
694 550
695 551 $data = $entry->description;
696 -
697 552 if ( ! is_array( $data ) || ! isset( $data['referrer'] ) ) {
698 553 $data = array( 'referrer' => $data );
699 554 }
700 555
@@ -711,9 +566,8 @@
711 566 * @return void
712 567 */
713 568 public static function destroy() {
714 569 $permission_error = FrmAppHelper::permission_nonce_error( 'frm_delete_entries', '_wpnonce', -1 );
715 -
716 570 if ( false !== $permission_error ) {
717 571 $error_args = array(
718 572 'title' => __( 'Verification failed', 'formidable' ),
719 573 'body' => $permission_error,
@@ -729,9 +583,8 @@
729 583 self::unlink_post( $params['id'] );
730 584 }
731 585
732 586 $message = '';
733 -
734 587 if ( FrmEntry::destroy( $params['id'] ) ) {
735 588 $message = __( 'Entry was successfully deleted', 'formidable' );
736 589 }
737 590
@@ -737,17 +590,10 @@
737 590
738 591 self::display_list( $message );
739 592 }
740 593
741 - /**
742 - * @param array|string $errors
743 - * @param bool $ajax
744 - *
745 - * @return void
746 - */
747 594 public static function process_entry( $errors = '', $ajax = false ) {
748 595 $form_id = FrmAppHelper::get_post_param( 'form_id', '', 'absint' );
749 -
750 596 if ( FrmAppHelper::is_admin() || empty( $_POST ) || empty( $form_id ) || ! isset( $_POST['item_key'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
751 597 return;
752 598 }
753 599
@@ -753,15 +599,13 @@
753 599
754 600 global $frm_vars;
755 601
756 602 $form = FrmForm::getOne( $form_id );
757 -
758 603 if ( ! $form ) {
759 604 return;
760 605 }
761 606
762 607 $is_preview = 'frm_forms_preview' === FrmAppHelper::simple_get( 'action' );
763 -
764 608 if ( $is_preview && FrmFormsHelper::should_block_preview( $form->form_key ) ) {
765 609 return;
766 610 }
767 611
@@ -792,9 +636,8 @@
792 636
793 637 if ( empty( $errors ) ) {
794 638 $_POST['frm_skip_cookie'] = 1;
795 639 $do_success = false;
796 -
797 640 if ( $params['action'] === 'create' ) {
798 641 if ( apply_filters( 'frm_continue_to_create', true, $form_id ) && ! isset( $frm_vars['created_entries'][ $form_id ]['entry_id'] ) ) {
799 642 $frm_vars['created_entries'][ $form_id ]['entry_id'] = FrmEntry::create( $_POST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
800 643
@@ -803,9 +646,8 @@
803 646 }
804 647 }
805 648
806 649 do_action( 'frm_process_entry', $params, $errors, $form, array( 'ajax' => $ajax ) );
807 -
808 650 if ( $do_success ) {
809 651 FrmFormsController::maybe_trigger_redirect( $form, $params, array( 'ajax' => $ajax ) );
810 652 }
811 653 unset( $_POST['frm_skip_cookie'] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
@@ -824,17 +666,8 @@
824 666 public static function prepare_redirect_url( $url ) {
825 667 return str_replace( array( ' ', '[', ']', '|', '@' ), array( '%20', '%5B', '%5D', '%7C', '%40' ), $url );
826 668 }
827 669
828 - /**
829 - * Delete entry if redirected.
830 - *
831 - * @param string $url
832 - * @param object $form
833 - * @param array $atts
834 - *
835 - * @return string
836 - */
837 670 public static function delete_entry_before_redirect( $url, $form, $atts ) {
838 671 self::_delete_entry( $atts['id'], $form );
839 672
840 673 return $url;
@@ -843,23 +676,13 @@
843 676 /**
844 677 * Delete entry if not redirected.
845 678 *
846 679 * @param array $atts
847 - *
848 - * @return void
849 680 */
850 681 public static function delete_entry_after_save( $atts ) {
851 682 self::_delete_entry( $atts['entry_id'], $atts['form'] );
852 683 }
853 684
854 - /**
855 - * Delete entry if not redirected.
856 - *
857 - * @param int $entry_id
858 - * @param object $form
859 - *
860 - * @return void
861 - */
862 685 private static function _delete_entry( $entry_id, $form ) {
863 686 if ( ! $form ) {
864 687 return;
865 688 }
@@ -864,9 +687,8 @@
864 687 return;
865 688 }
866 689
867 690 FrmAppHelper::unserialize_or_decode( $form->options );
868 -
869 691 if ( isset( $form->options['no_save'] ) && $form->options['no_save'] ) {
870 692 self::unlink_post( $entry_id );
871 693 FrmEntry::destroy( $entry_id );
872 694 }
@@ -873,12 +695,8 @@
873 695 }
874 696
875 697 /**
876 698 * Unlink entry from post
877 - *
878 - * @param int $entry_id
879 - *
880 - * @return void
881 699 */
882 700 private static function unlink_post( $entry_id ) {
883 701 global $wpdb;
884 702 $wpdb->update( $wpdb->prefix . 'frm_items', array( 'post_id' => '' ), array( 'id' => $entry_id ) );
@@ -914,9 +732,8 @@
914 732 'exclude_fields' => '',
915 733 'include_fields' => '',
916 734 'include_extras' => '',
917 735 'inline_style' => 1,
918 - 'table_style' => '',
919 736 // Return embedded fields as nested array.
920 737 'child_array' => false,
921 738 'line_breaks' => true,
922 739 'array_separator' => ', ',
@@ -943,13 +760,8 @@
943 760
944 761 return $formatted_entry;
945 762 }
946 763
947 - /**
948 - * @param false|object $entry
949 - *
950 - * @return void
951 - */
952 764 public static function entry_sidebar( $entry = false ) {
953 765 $data = array();
954 766 $id = 0;
955 767
@@ -958,9 +770,8 @@
958 770
959 771 if ( $entry ) {
960 772 $id = $entry->id;
961 773 $data = $entry->description;
962 -
963 774 if ( isset( $data['browser'] ) ) {
964 775 $browser = FrmEntriesHelper::get_browser( $data['browser'] );
965 776 }
966 777 /**