PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.8
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.8
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 +24 -11 6.36.8 View file →
@@ -35,9 +35,11 @@
35 35 add_filter( 'screen_options_show_screen', __CLASS__ . '::remove_screen_options', 10, 2 );
36 36 }
37 37 }
38 38
39 - /* Display in Back End */
39 + /**
40 + * Display in Back End.
41 + */
40 42 public static function route() {
41 43 $action = FrmAppHelper::get_param( 'frm_action', '', 'get', 'sanitize_title' );
42 44 FrmAppHelper::include_svg();
43 45
@@ -80,13 +82,14 @@
80 82
81 83 if ( $form_id ) {
82 84 self::get_columns_for_form( $form_id, $columns );
83 85 } else {
84 - $columns[ $form_id . '_form_id' ] = __( 'Form', 'formidable' );
85 - $columns[ $form_id . '_name' ] = __( 'Entry Name', 'formidable' );
86 - $columns[ $form_id . '_user_id' ] = __( 'Created By', 'formidable' );
86 + $columns[ $form_id . '_form_id' ] = esc_html__( 'Form', 'formidable' );
87 + $columns[ $form_id . '_name' ] = esc_html__( 'Entry Name', 'formidable' );
88 + $columns[ $form_id . '_user_id' ] = esc_html__( 'Created By', 'formidable' );
87 89 }
88 90
91 + $columns[ $form_id . '_is_draft' ] = esc_html__( 'Entry Status', 'formidable' );
89 92 $columns[ $form_id . '_created_at' ] = __( 'Entry creation date', 'formidable' );
90 93 $columns[ $form_id . '_updated_at' ] = __( 'Entry update date', 'formidable' );
91 94 self::maybe_add_ip_col( $form_id, $columns );
92 95
@@ -96,9 +99,9 @@
96 99 if ( FrmAppHelper::is_admin_page( 'formidable-entries' ) && in_array( $action, array( '', 'list', 'destroy' ) ) ) {
97 100 add_screen_option(
98 101 'per_page',
99 102 array(
100 - 'label' => __( 'Entries', 'formidable' ),
103 + 'label' => esc_html__( 'Entries', 'formidable' ),
101 104 'default' => 20,
102 105 'option' => 'formidable_page_formidable_entries_per_page',
103 106 )
104 107 );
@@ -187,9 +190,9 @@
187 190 $prev_value = get_metadata( 'user', $object_id, $meta_key, true );
188 191 }
189 192
190 193 global $frm_vars;
191 - //add a check so we don't create a loop
194 + // Add a check so we don't create a loop.
192 195 $frm_vars['prev_hidden_cols'] = ( isset( $frm_vars['prev_hidden_cols'] ) && $frm_vars['prev_hidden_cols'] ) ? false : $prev_value;
193 196
194 197 return $check;
195 198 }
@@ -204,9 +207,10 @@
204 207 }
205 208
206 209 global $frm_vars;
207 210 if ( ! isset( $frm_vars['prev_hidden_cols'] ) || ! $frm_vars['prev_hidden_cols'] ) {
208 - return; // Don't continue if there's no previous value.
211 + // Don't continue if there's no previous value.
212 + return;
209 213 }
210 214
211 215 foreach ( $meta_value as $mk => $mv ) {
212 216 // Remove blank values.
@@ -440,9 +444,11 @@
440 444 $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 );
441 445 }
442 446 }
443 447
444 - /* Back End CRUD */
448 + /**
449 + * Back End CRUD.
450 + */
445 451 public static function show( $id = 0 ) {
446 452 FrmAppHelper::permission_check( 'frm_view_entries' );
447 453
448 454 if ( ! $id ) {
@@ -481,9 +487,15 @@
481 487 */
482 488 public static function destroy() {
483 489 $permission_error = FrmAppHelper::permission_nonce_error( 'frm_delete_entries', '_wpnonce', -1 );
484 490 if ( false !== $permission_error ) {
485 - wp_die( esc_html( $permission_error ) );
491 + $error_args = array(
492 + 'title' => __( 'Verification failed', 'formidable' ),
493 + 'body' => $permission_error,
494 + 'cancel_url' => admin_url( 'admin.php?page=formidable-entries' ),
495 + );
496 + FrmAppController::show_error_modal( $error_args );
497 + return;
486 498 }
487 499
488 500 $params = FrmForm::get_admin_params();
489 501
@@ -616,9 +628,9 @@
616 628 FrmEntry::clear_cache();
617 629 }
618 630
619 631 /**
620 - * @param $atts
632 + * @param array $atts
621 633 *
622 634 * @return array|string
623 635 */
624 636 public static function show_entry_shortcode( $atts ) {
@@ -645,9 +657,10 @@
645 657 'exclude_fields' => '',
646 658 'include_fields' => '',
647 659 'include_extras' => '',
648 660 'inline_style' => 1,
649 - 'child_array' => false, // return embedded fields as nested array
661 + // Return embedded fields as nested array.
662 + 'child_array' => false,
650 663 'line_breaks' => true,
651 664 'array_separator' => ', ',
652 665 );
653 666 $defaults = apply_filters( 'frm_show_entry_defaults', $defaults );