PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 4.07.01
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v4.07.01
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 +109 -228 6.254.07.01 View file →
@@ -9,14 +9,10 @@
9 9 FrmAppHelper::force_capability( 'frm_view_entries' );
10 10
11 11 add_submenu_page( 'formidable', 'Formidable | ' . __( 'Entries', 'formidable' ), __( 'Entries', 'formidable' ), 'frm_view_entries', 'formidable-entries', 'FrmEntriesController::route' );
12 12
13 - $views_installed = is_callable( 'FrmProAppHelper::views_is_installed' ) && FrmProAppHelper::views_is_installed();
14 - if ( ! $views_installed ) {
13 + if ( ! FrmAppHelper::pro_is_installed() ) {
15 14 add_submenu_page( 'formidable', 'Formidable | ' . __( 'Views', 'formidable' ), __( 'Views', 'formidable' ), 'frm_view_entries', 'formidable-views', 'FrmFormsController::no_views' );
16 - self::maybe_redirect_to_views_upsell();
17 - } else {
18 - self::maybe_redirect_to_views_index();
19 15 }
20 16
21 17 if ( FrmAppHelper::is_admin_page( 'formidable-entries' ) ) {
22 18 self::load_manage_entries_hooks();
@@ -23,77 +19,12 @@
23 19 }
24 20 }
25 21
26 22 /**
27 - * This function is called when views is installed.
28 - * The Views add-on uses a different URL for the Views tab than the upsell page.
29 - * If the user is on the upsell page, instead of showing a permission error on reload,
30 - * redirect to the views index page.
31 - *
32 - * @since 6.14.1
33 - *
34 - * @return void
35 - */
36 - private static function maybe_redirect_to_views_index() {
37 - if ( ! FrmAppHelper::is_admin_page( 'formidable-views' ) ) {
38 - return;
39 - }
40 -
41 - $query_args = array(
42 - 'post_type' => 'frm_display',
43 - );
44 - $query_args = self::add_url_params_to_views_redirect_query_args( $query_args );
45 -
46 - wp_safe_redirect( add_query_arg( $query_args, admin_url( 'edit.php' ) ) );
47 - die();
48 - }
49 -
50 - /**
51 - * This function is called when views is inactive.
52 - * A user may deactivate views but then try to reload the views index.
53 - * Instead of showing a permission error, redirect to the views upsell page.
54 - *
55 - * @since 6.14.1
56 - *
57 - * @return void
58 - */
59 - private static function maybe_redirect_to_views_upsell() {
60 - global $pagenow;
61 - if ( 'edit.php' !== $pagenow || 'frm_display' !== FrmAppHelper::simple_get( 'post_type' ) ) {
62 - return;
63 - }
64 -
65 - $query_args = array(
66 - 'page' => 'formidable-views',
67 - );
68 - $query_args = self::add_url_params_to_views_redirect_query_args( $query_args );
69 -
70 - wp_safe_redirect( add_query_arg( $query_args, admin_url( 'admin.php' ) ) );
71 - die();
72 - }
73 -
74 - /**
75 - * @since 6.14.1
76 - *
77 - * @param array $query_args
78 - * @return array
79 - */
80 - private static function add_url_params_to_views_redirect_query_args( $query_args ) {
81 - $query_args['show_nav'] = FrmAppHelper::simple_get( 'show_nav', 'absint', 0 );
82 -
83 - $form_id = FrmAppHelper::simple_get( 'form', 'absint', 0 );
84 - if ( $form_id ) {
85 - $query_args['form'] = $form_id;
86 - }
87 -
88 - return $query_args;
89 - }
90 -
91 - /**
92 23 * @since 2.05.07
93 24 */
94 25 private static function load_manage_entries_hooks() {
95 - if ( ! in_array( FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ), array( 'edit', 'show', 'new', 'duplicate' ), true ) ) {
26 + if ( ! in_array( FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ), array( 'edit', 'show', 'new' ) ) ) {
96 27 $menu_name = FrmAppHelper::get_menu_name();
97 28 $base = self::base_column_key( $menu_name );
98 29
99 30 add_filter( 'manage_' . $base . '_columns', 'FrmEntriesController::manage_columns' );
@@ -99,15 +30,13 @@
99 30 add_filter( 'manage_' . $base . '_columns', 'FrmEntriesController::manage_columns' );
100 31 add_filter( 'get_user_option_' . self::hidden_column_key( $menu_name ), 'FrmEntriesController::hidden_columns' );
101 32 add_filter( 'manage_' . $base . '_sortable_columns', 'FrmEntriesController::sortable_columns' );
102 33 } else {
103 - add_filter( 'screen_options_show_screen', self::class . '::remove_screen_options', 10, 2 );
34 + add_filter( 'screen_options_show_screen', __CLASS__ . '::remove_screen_options', 10, 2 );
104 35 }
105 36 }
106 37
107 - /**
108 - * Display in Back End.
109 - */
38 + /* Display in Back End */
110 39 public static function route() {
111 40 $action = FrmAppHelper::get_param( 'frm_action', '', 'get', 'sanitize_title' );
112 41 FrmAppHelper::include_svg();
113 42
@@ -132,12 +61,10 @@
132 61 *
133 62 * @since 3.0
134 63 */
135 64 public static function remove_screen_options( $show_screen, $screen ) {
136 - $menu_name = sanitize_title( FrmAppHelper::get_menu_name() );
137 - $unread_count = FrmEntriesHelper::get_visible_unread_inbox_count();
138 -
139 - if ( $screen->id === $menu_name . ( $unread_count ? '-' . $unread_count : '' ) . '_page_formidable-entries' ) {
65 + $menu_name = sanitize_title( FrmAppHelper::get_menu_name() );
66 + if ( $screen->id == $menu_name . '_page_formidable-entries' ) {
140 67 $show_screen = false;
141 68 }
142 69
143 70 return $show_screen;
@@ -152,14 +79,13 @@
152 79
153 80 if ( $form_id ) {
154 81 self::get_columns_for_form( $form_id, $columns );
155 82 } else {
156 - $columns[ $form_id . '_form_id' ] = esc_html__( 'Form', 'formidable' );
157 - $columns[ $form_id . '_name' ] = esc_html__( 'Entry Name', 'formidable' );
158 - $columns[ $form_id . '_user_id' ] = esc_html__( 'Created By', 'formidable' );
83 + $columns[ $form_id . '_form_id' ] = __( 'Form', 'formidable' );
84 + $columns[ $form_id . '_name' ] = __( 'Entry Name', 'formidable' );
85 + $columns[ $form_id . '_user_id' ] = __( 'Created By', 'formidable' );
159 86 }
160 87
161 - $columns[ $form_id . '_is_draft' ] = esc_html__( 'Entry Status', 'formidable' );
162 88 $columns[ $form_id . '_created_at' ] = __( 'Entry creation date', 'formidable' );
163 89 $columns[ $form_id . '_updated_at' ] = __( 'Entry update date', 'formidable' );
164 90 self::maybe_add_ip_col( $form_id, $columns );
165 91
@@ -169,9 +95,9 @@
169 95 if ( FrmAppHelper::is_admin_page( 'formidable-entries' ) && in_array( $action, array( '', 'list', 'destroy' ) ) ) {
170 96 add_screen_option(
171 97 'per_page',
172 98 array(
173 - 'label' => esc_html__( 'Entries', 'formidable' ),
99 + 'label' => __( 'Entries', 'formidable' ),
174 100 'default' => 20,
175 101 'option' => 'formidable_page_formidable_entries_per_page',
176 102 )
177 103 );
@@ -182,24 +108,14 @@
182 108
183 109 private static function get_columns_for_form( $form_id, &$columns ) {
184 110 $form_cols = FrmField::get_all_for_form( $form_id, '', 'include' );
185 111
186 - /**
187 - * Allows changing fields in the Entries list table heading.
188 - *
189 - * @since 5.0.04
190 - *
191 - * @param array $fields Array of fields.
192 - * @param array $args The arguments. Contains `form_id`.
193 - */
194 - $form_cols = apply_filters( 'frm_fields_in_entries_list_table', $form_cols, compact( 'form_id' ) );
195 -
196 112 foreach ( $form_cols as $form_col ) {
197 113 if ( FrmField::is_no_save_field( $form_col->type ) ) {
198 114 continue;
199 115 }
200 116
201 - $has_child_fields = $form_col->type === 'form' && ! empty( $form_col->field_options['form_select'] );
117 + $has_child_fields = $form_col->type == 'form' && isset( $form_col->field_options['form_select'] ) && ! empty( $form_col->field_options['form_select'] );
202 118 if ( $has_child_fields ) {
203 119 self::add_subform_cols( $form_col, $form_id, $columns );
204 120 } else {
205 121 self::add_field_cols( $form_col, $form_id, $columns );
@@ -235,9 +151,9 @@
235 151 $col_id .= '-_-form' . $field->form_id;
236 152 }
237 153
238 154 $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';
155 + $is_post_status = FrmField::is_option_true( $field, 'post_field' ) && $field->field_options['post_field'] == 'post_status';
240 156 if ( $has_separate_value && ! $is_post_status ) {
241 157 $columns[ $form_id . '_frmsep_' . $col_id ] = FrmAppHelper::truncate( $field->name, 35 );
242 158 }
243 159
@@ -260,10 +176,10 @@
260 176 $prev_value = get_metadata( 'user', $object_id, $meta_key, true );
261 177 }
262 178
263 179 global $frm_vars;
264 - // Add a check so we don't create a loop.
265 - $frm_vars['prev_hidden_cols'] = ! empty( $frm_vars['prev_hidden_cols'] ) ? false : $prev_value;
180 + //add a check so we don't create a loop
181 + $frm_vars['prev_hidden_cols'] = ( isset( $frm_vars['prev_hidden_cols'] ) && $frm_vars['prev_hidden_cols'] ) ? false : $prev_value;
266 182
267 183 return $check;
268 184 }
269 185
@@ -277,10 +193,9 @@
277 193 }
278 194
279 195 global $frm_vars;
280 196 if ( ! isset( $frm_vars['prev_hidden_cols'] ) || ! $frm_vars['prev_hidden_cols'] ) {
281 - // Don't continue if there's no previous value.
282 - return;
197 + return; // Don't continue if there's no previous value.
283 198 }
284 199
285 200 foreach ( $meta_value as $mk => $mv ) {
286 201 // Remove blank values.
@@ -334,15 +249,13 @@
334 249 if ( empty( $menu_name ) ) {
335 250 $menu_name = FrmAppHelper::get_menu_name();
336 251 }
337 252
338 - $unread_count = FrmEntriesHelper::get_visible_unread_inbox_count();
339 -
340 - return sanitize_title( $menu_name ) . ( $unread_count ? '-' . $unread_count : '' ) . '_page_formidable-entries';
253 + return sanitize_title( $menu_name ) . '_page_formidable-entries';
341 254 }
342 255
343 256 public static function save_per_page( $save, $option, $value ) {
344 - if ( $option === 'formidable_page_formidable_entries_per_page' ) {
257 + if ( $option == 'formidable_page_formidable_entries_per_page' ) {
345 258 $save = (int) $value;
346 259 }
347 260
348 261 return $save;
@@ -360,16 +273,11 @@
360 273 $form_id . '_item_key' => 'item_key',
361 274 $form_id . '_is_draft' => 'is_draft',
362 275 );
363 276
364 - if ( ! $form_id ) {
365 - $columns[ $form_id . '_user_id' ] = 'user_id';
366 - $columns[ $form_id . '_name' ] = 'name';
367 - $columns[ $form_id . '_form_id' ] = 'form_id';
368 - }
369 -
370 277 foreach ( $fields as $field ) {
371 - if ( self::field_supports_sorting( $field ) ) {
278 + if ( $field->type != 'checkbox' && ( ! isset( $field->field_options['post_field'] ) || $field->field_options['post_field'] == '' ) ) {
279 + // Can't sort on checkboxes because they are stored serialized, or post fields
372 280 $columns[ $form_id . '_' . $field->field_key ] = 'meta_' . $field->id;
373 281 }
374 282 }
375 283
@@ -375,42 +283,22 @@
375 283
376 284 return $columns;
377 285 }
378 286
379 - /**
380 - * Can't sort on checkboxes because they are sorted serialized.
381 - * Some post content can be sorted but not everything.
382 - *
383 - * @param stdClass $field
384 - * @return bool
385 - */
386 - private static function field_supports_sorting( $field ) {
387 - $is_sortable = 'checkbox' !== $field->type && empty( $field->field_options['post_field'] );
388 - return apply_filters( 'frm_field_column_is_sortable', $is_sortable, $field );
389 - }
390 -
391 - /**
392 - * @param mixed $result Option value from database for hidden columns in entries table.
393 - * @return array
394 - */
395 287 public static function hidden_columns( $result ) {
396 - global $frm_vars;
288 + $form_id = FrmForm::get_current_form_id();
397 289
398 - if ( ! is_array( $result ) ) {
399 - // Force an unexpected value to be an array.
400 - // Since $result is a filtered option and gets saved to the database, it's possible it could be a string.
401 - // Since this code expects an array it would break with a "Uncaught Error: [] operator not supported for strings" error.
402 - $result = array();
403 - }
290 + $hidden = self::user_hidden_columns_for_form( $form_id, $result );
404 291
405 - $form_id = FrmForm::get_current_form_id();
406 - $hidden = self::user_hidden_columns_for_form( $form_id, $result );
407 - $i = isset( $frm_vars['cols'] ) ? count( $frm_vars['cols'] ) : 0;
408 - $max_columns = 11;
292 + global $frm_vars;
293 + $i = isset( $frm_vars['cols'] ) ? count( $frm_vars['cols'] ) : 0;
409 294
410 295 if ( ! empty( $hidden ) ) {
411 - $result = $hidden;
412 - $i = $i - count( $result );
296 + $result = $hidden;
297 + $i = $i - count( $result );
298 + $max_columns = 11;
299 + } else {
300 + $max_columns = 8;
413 301 }
414 302
415 303 if ( $i <= $max_columns ) {
416 304 return $result;
@@ -429,9 +317,9 @@
429 317 foreach ( (array) $result as $r ) {
430 318 if ( ! empty( $r ) ) {
431 319 list( $form_prefix, $field_key ) = explode( '_', $r );
432 320
433 - if ( (int) $form_prefix === (int) $form_id ) {
321 + if ( (int) $form_prefix == (int) $form_id ) {
434 322 $hidden[] = $r;
435 323 }
436 324
437 325 unset( $form_prefix );
@@ -444,12 +332,8 @@
444 332 /**
445 333 * Remove some columns by default when there are too many
446 334 *
447 335 * @since 2.05.07
448 - *
449 - * @param array $atts
450 - * @param array $result
451 - * @return void
452 336 */
453 337 private static function remove_excess_cols( $atts, &$result ) {
454 338 global $frm_vars;
455 339
@@ -467,9 +351,9 @@
467 351 }
468 352
469 353 if ( empty( $result ) || ! in_array( $col_key, $result, true ) ) {
470 354 $result[] = $col_key;
471 - --$i;
355 + $i--;
472 356 }
473 357
474 358 unset( $col_key, $col );
475 359 }
@@ -499,9 +383,9 @@
499 383 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
500 384 if ( $pagenum > $total_pages && $total_pages > 0 ) {
501 385 $url = add_query_arg( 'paged', $total_pages );
502 386 if ( headers_sent() ) {
503 - FrmAppHelper::js_redirect( $url, true );
387 + echo FrmAppHelper::js_redirect( $url ); // WPCS: XSS ok.
504 388 } else {
505 389 wp_redirect( esc_url_raw( $url ) );
506 390 }
507 391 die();
@@ -510,24 +394,22 @@
510 394 if ( empty( $message ) && isset( $_GET['import-message'] ) ) {
511 395 $message = __( 'Your import is complete', 'formidable' );
512 396 }
513 397
514 - require FrmAppHelper::plugin_path() . '/classes/views/frm-entries/list.php';
398 + require( FrmAppHelper::plugin_path() . '/classes/views/frm-entries/list.php' );
515 399 }
516 400
517 401 private static function get_delete_form_time( $form, &$errors ) {
518 - if ( 'trash' === $form->status ) {
402 + if ( 'trash' == $form->status ) {
519 403 $delete_timestamp = time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS );
520 - $time_to_delete = FrmAppHelper::human_time_diff( $delete_timestamp, ( $form->options['trash_time'] ?? time() ) );
404 + $time_to_delete = FrmAppHelper::human_time_diff( $delete_timestamp, ( isset( $form->options['trash_time'] ) ? ( $form->options['trash_time'] ) : time() ) );
521 405
522 406 /* translators: %1$s: Time string */
523 - $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 );
407 + $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 );
524 408 }
525 409 }
526 410
527 - /**
528 - * Back End CRUD.
529 - */
411 + /* Back End CRUD */
530 412 public static function show( $id = 0 ) {
531 413 FrmAppHelper::permission_check( 'frm_view_entries' );
532 414
533 415 if ( ! $id ) {
@@ -539,15 +421,12 @@
539 421 }
540 422
541 423 $entry = FrmEntry::getOne( $id, true );
542 424 if ( ! $entry ) {
543 - FrmAppController::show_error_modal(
544 - array(
545 - 'title' => __( 'You can\'t view the entry', 'formidable' ),
546 - 'body' => __( 'You are trying to view an entry that does not exist', 'formidable' ),
547 - 'cancel_url' => admin_url( 'admin.php?page=formidable' ),
548 - )
549 - );
425 + echo '<div id="form_show_entry_page" class="wrap">' .
426 + esc_html__( 'You are trying to view an entry that does not exist.', 'formidable' ) .
427 + '</div>';
428 +
550 429 return;
551 430 }
552 431
553 432 $data = $entry->description;
@@ -557,28 +436,13 @@
557 436
558 437 $fields = FrmField::get_all_for_form( $entry->form_id, '', 'include' );
559 438 $form = FrmForm::getOne( $entry->form_id );
560 439
561 - include FrmAppHelper::plugin_path() . '/classes/views/frm-entries/show.php';
440 + include( FrmAppHelper::plugin_path() . '/classes/views/frm-entries/show.php' );
562 441 }
563 442
564 - /**
565 - * Destroy an entry from the admin page.
566 - * This is triggered from the entries list from the "Delete" row action, and also from the "Delete Entry" trigger in the view/edit entry sidebar.
567 - *
568 - * @return void
569 - */
570 443 public static function destroy() {
571 - $permission_error = FrmAppHelper::permission_nonce_error( 'frm_delete_entries', '_wpnonce', -1 );
572 - if ( false !== $permission_error ) {
573 - $error_args = array(
574 - 'title' => __( 'Verification failed', 'formidable' ),
575 - 'body' => $permission_error,
576 - 'cancel_url' => admin_url( 'admin.php?page=formidable-entries' ),
577 - );
578 - FrmAppController::show_error_modal( $error_args );
579 - return;
580 - }
444 + FrmAppHelper::permission_check( 'frm_delete_entries' );
581 445
582 446 $params = FrmForm::get_admin_params();
583 447
584 448 if ( isset( $params['keep_post'] ) && $params['keep_post'] ) {
@@ -586,17 +450,27 @@
586 450 }
587 451
588 452 $message = '';
589 453 if ( FrmEntry::destroy( $params['id'] ) ) {
590 - $message = __( 'Entry was successfully deleted', 'formidable' );
454 + $message = __( 'Entry was Successfully Deleted', 'formidable' );
591 455 }
592 456
593 457 self::display_list( $message );
594 458 }
595 459
460 + /**
461 + * @deprecated 4.02.04 - Moved to Pro since it was unused in Lite.
462 + */
463 + public static function destroy_all() {
464 + _deprecated_function( __METHOD__, '4.02.04', 'FrmProEntriesController::destroy_all' );
465 + if ( is_callable( 'FrmProEntriesController::destroy_all' ) ) {
466 + FrmProEntriesController::destroy_all();
467 + }
468 + }
469 +
596 470 public static function process_entry( $errors = '', $ajax = false ) {
597 471 $form_id = FrmAppHelper::get_post_param( 'form_id', '', 'absint' );
598 - if ( FrmAppHelper::is_admin() || empty( $_POST ) || empty( $form_id ) || ! isset( $_POST['item_key'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
472 + if ( FrmAppHelper::is_admin() || empty( $_POST ) || empty( $form_id ) || ! isset( $_POST['item_key'] ) ) {
599 473 return;
600 474 }
601 475
602 476 global $frm_vars;
@@ -605,13 +479,8 @@
605 479 if ( ! $form ) {
606 480 return;
607 481 }
608 482
609 - $is_preview = 'frm_forms_preview' === FrmAppHelper::simple_get( 'action' );
610 - if ( $is_preview && FrmFormsHelper::should_block_preview( $form->form_key ) ) {
611 - return;
612 - }
613 -
614 483 $params = FrmForm::get_params( $form );
615 484
616 485 if ( ! isset( $frm_vars['form_params'] ) ) {
617 486 $frm_vars['form_params'] = array();
@@ -622,9 +491,9 @@
622 491 return;
623 492 }
624 493
625 494 if ( $errors == '' && ! $ajax ) {
626 - $errors = FrmEntryValidate::validate( wp_unslash( $_POST ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
495 + $errors = FrmEntryValidate::validate( wp_unslash( $_POST ) );
627 496 }
628 497
629 498 /**
630 499 * Use this filter to add trigger actions and add errors after
@@ -638,11 +507,11 @@
638 507
639 508 if ( empty( $errors ) ) {
640 509 $_POST['frm_skip_cookie'] = 1;
641 510 $do_success = false;
642 - if ( $params['action'] === 'create' ) {
511 + if ( $params['action'] == 'create' ) {
643 512 if ( apply_filters( 'frm_continue_to_create', true, $form_id ) && ! isset( $frm_vars['created_entries'][ $form_id ]['entry_id'] ) ) {
644 - $frm_vars['created_entries'][ $form_id ]['entry_id'] = FrmEntry::create( $_POST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
513 + $frm_vars['created_entries'][ $form_id ]['entry_id'] = FrmEntry::create( $_POST );
645 514
646 515 $params['id'] = $frm_vars['created_entries'][ $form_id ]['entry_id'];
647 516 $do_success = true;
648 517 }
@@ -651,9 +520,9 @@
651 520 do_action( 'frm_process_entry', $params, $errors, $form, array( 'ajax' => $ajax ) );
652 521 if ( $do_success ) {
653 522 FrmFormsController::maybe_trigger_redirect( $form, $params, array( 'ajax' => $ajax ) );
654 523 }
655 - unset( $_POST['frm_skip_cookie'] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
524 + unset( $_POST['frm_skip_cookie'] );
656 525 }
657 526 }
658 527
659 528 /**
@@ -705,42 +574,39 @@
705 574 FrmEntry::clear_cache();
706 575 }
707 576
708 577 /**
709 - * @param array $atts
578 + * @param $atts
710 579 *
711 580 * @return array|string
712 581 */
713 582 public static function show_entry_shortcode( $atts ) {
714 583 $defaults = array(
715 - 'id' => false,
716 - 'entry' => false,
717 - 'fields' => false,
718 - 'plain_text' => false,
719 - 'user_info' => false,
720 - 'include_blank' => false,
721 - 'default_email' => false,
722 - 'form_id' => false,
723 - 'format' => 'text',
724 - 'array_key' => 'key',
725 - 'direction' => 'ltr',
726 - 'font_size' => '',
727 - 'text_color' => '',
728 - 'border_width' => '',
729 - 'border_color' => '',
730 - 'bg_color' => '',
731 - 'alt_bg_color' => '',
732 - 'class' => '',
733 - 'clickable' => false,
734 - 'exclude_fields' => '',
735 - 'include_fields' => '',
736 - 'include_extras' => '',
737 - 'inline_style' => 1,
738 - 'table_style' => '',
739 - // Return embedded fields as nested array.
740 - 'child_array' => false,
741 - 'line_breaks' => true,
742 - 'array_separator' => ', ',
584 + 'id' => false,
585 + 'entry' => false,
586 + 'fields' => false,
587 + 'plain_text' => false,
588 + 'user_info' => false,
589 + 'include_blank' => false,
590 + 'default_email' => false,
591 + 'form_id' => false,
592 + 'format' => 'text',
593 + 'array_key' => 'key',
594 + 'direction' => 'ltr',
595 + 'font_size' => '',
596 + 'text_color' => '',
597 + 'border_width' => '',
598 + 'border_color' => '',
599 + 'bg_color' => '',
600 + 'alt_bg_color' => '',
601 + 'class' => '',
602 + 'clickable' => false,
603 + 'exclude_fields' => '',
604 + 'include_fields' => '',
605 + 'include_extras' => '',
606 + 'inline_style' => 1,
607 + 'child_array' => false, // return embedded fields as nested array
608 + 'line_breaks' => true,
743 609 );
744 610 $defaults = apply_filters( 'frm_show_entry_defaults', $defaults );
745 611
746 612 $atts = shortcode_atts( $defaults, $atts );
@@ -776,18 +642,33 @@
776 642 $data = $entry->description;
777 643 if ( isset( $data['browser'] ) ) {
778 644 $browser = FrmEntriesHelper::get_browser( $data['browser'] );
779 645 }
780 - /**
781 - * Add or remove information in the entry sidebar.
782 - *
783 - * @since 5.5.2
784 - *
785 - * @param array $data
786 - * @param array{entry:\stdClass} $entry
787 - */
788 - $data = apply_filters( 'frm_sidebar_data', $data, compact( 'entry' ) );
789 646 }
790 647
791 - include FrmAppHelper::plugin_path() . '/classes/views/frm-entries/sidebar-shared.php';
648 + include( FrmAppHelper::plugin_path() . '/classes/views/frm-entries/sidebar-shared.php' );
649 + }
650 +
651 + /**
652 + * @deprecated 4.0
653 + */
654 + public static function contextual_help( $help, $screen_id, $screen ) {
655 + _deprecated_function( __METHOD__, '4.0' );
656 + return $help;
657 + }
658 +
659 + /**
660 + * @deprecated 1.07.05
661 + * @codeCoverageIgnore
662 + */
663 + public static function show_form( $id = '', $key = '', $title = false, $description = false ) {
664 + return FrmDeprecated::show_form( $id, $key, $title, $description );
665 + }
666 +
667 + /**
668 + * @deprecated 1.07.05
669 + * @codeCoverageIgnore
670 + */
671 + public static function get_form( $filename, $form, $title, $description ) {
672 + return FrmDeprecated::get_form( $filename, $form, $title, $description );
792 673 }
793 674 }