PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.7.2
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.7.2
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 +23 -11 6.4.26.7.2 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,11 +82,11 @@
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
89 91 $columns[ $form_id . '_is_draft' ] = esc_html__( 'Entry Status', 'formidable' );
90 92 $columns[ $form_id . '_created_at' ] = __( 'Entry creation date', 'formidable' );
@@ -97,9 +99,9 @@
97 99 if ( FrmAppHelper::is_admin_page( 'formidable-entries' ) && in_array( $action, array( '', 'list', 'destroy' ) ) ) {
98 100 add_screen_option(
99 101 'per_page',
100 102 array(
101 - 'label' => __( 'Entries', 'formidable' ),
103 + 'label' => esc_html__( 'Entries', 'formidable' ),
102 104 'default' => 20,
103 105 'option' => 'formidable_page_formidable_entries_per_page',
104 106 )
105 107 );
@@ -188,9 +190,9 @@
188 190 $prev_value = get_metadata( 'user', $object_id, $meta_key, true );
189 191 }
190 192
191 193 global $frm_vars;
192 - //add a check so we don't create a loop
194 + // Add a check so we don't create a loop.
193 195 $frm_vars['prev_hidden_cols'] = ( isset( $frm_vars['prev_hidden_cols'] ) && $frm_vars['prev_hidden_cols'] ) ? false : $prev_value;
194 196
195 197 return $check;
196 198 }
@@ -205,9 +207,10 @@
205 207 }
206 208
207 209 global $frm_vars;
208 210 if ( ! isset( $frm_vars['prev_hidden_cols'] ) || ! $frm_vars['prev_hidden_cols'] ) {
209 - return; // Don't continue if there's no previous value.
211 + // Don't continue if there's no previous value.
212 + return;
210 213 }
211 214
212 215 foreach ( $meta_value as $mk => $mv ) {
213 216 // Remove blank values.
@@ -441,9 +444,11 @@
441 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 );
442 445 }
443 446 }
444 447
445 - /* Back End CRUD */
448 + /**
449 + * Back End CRUD.
450 + */
446 451 public static function show( $id = 0 ) {
447 452 FrmAppHelper::permission_check( 'frm_view_entries' );
448 453
449 454 if ( ! $id ) {
@@ -482,9 +487,15 @@
482 487 */
483 488 public static function destroy() {
484 489 $permission_error = FrmAppHelper::permission_nonce_error( 'frm_delete_entries', '_wpnonce', -1 );
485 490 if ( false !== $permission_error ) {
486 - 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;
487 498 }
488 499
489 500 $params = FrmForm::get_admin_params();
490 501
@@ -617,9 +628,9 @@
617 628 FrmEntry::clear_cache();
618 629 }
619 630
620 631 /**
621 - * @param $atts
632 + * @param array $atts
622 633 *
623 634 * @return array|string
624 635 */
625 636 public static function show_entry_shortcode( $atts ) {
@@ -646,9 +657,10 @@
646 657 'exclude_fields' => '',
647 658 'include_fields' => '',
648 659 'include_extras' => '',
649 660 'inline_style' => 1,
650 - 'child_array' => false, // return embedded fields as nested array
661 + // Return embedded fields as nested array.
662 + 'child_array' => false,
651 663 'line_breaks' => true,
652 664 'array_separator' => ', ',
653 665 );
654 666 $defaults = apply_filters( 'frm_show_entry_defaults', $defaults );