PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.5.6
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.5.6
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
formidable / classes / controllers / FrmEntriesController.php

FrmEntriesController.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 5.5.6, at classes/controllers/FrmEntriesController.php

716 lines 20.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die( 'You are not allowed to call this page directly.' );
4 }
5
6 class FrmEntriesController {
7
8 public static function menu() {
9 FrmAppHelper::force_capability( 'frm_view_entries' );
10
11 add_submenu_page( 'formidable', 'Formidable | ' . __( 'Entries', 'formidable' ), __( 'Entries', 'formidable' ), 'frm_view_entries', 'formidable-entries', 'FrmEntriesController::route' );
12
13 $views_installed = is_callable( 'FrmProAppHelper::views_is_installed' ) ? FrmProAppHelper::views_is_installed() : FrmAppHelper::pro_is_installed();
14 if ( ! $views_installed ) {
15 add_submenu_page( 'formidable', 'Formidable | ' . __( 'Views', 'formidable' ), __( 'Views', 'formidable' ), 'frm_view_entries', 'formidable-views', 'FrmFormsController::no_views' );
16 }
17
18 if ( FrmAppHelper::is_admin_page( 'formidable-entries' ) ) {
19 self::load_manage_entries_hooks();
20 }
21 }
22
23 /**
24 * @since 2.05.07
25 */
26 private static function load_manage_entries_hooks() {
27 if ( ! in_array( FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' ), array( 'edit', 'show', 'new', 'duplicate' ), true ) ) {
28 $menu_name = FrmAppHelper::get_menu_name();
29 $base = self::base_column_key( $menu_name );
30
31 add_filter( 'manage_' . $base . '_columns', 'FrmEntriesController::manage_columns' );
32 add_filter( 'get_user_option_' . self::hidden_column_key( $menu_name ), 'FrmEntriesController::hidden_columns' );
33 add_filter( 'manage_' . $base . '_sortable_columns', 'FrmEntriesController::sortable_columns' );
34 } else {
35 add_filter( 'screen_options_show_screen', __CLASS__ . '::remove_screen_options', 10, 2 );
36 }
37 }
38
39 /* Display in Back End */
40 public static function route() {
41 $action = FrmAppHelper::get_param( 'frm_action', '', 'get', 'sanitize_title' );
42 FrmAppHelper::include_svg();
43
44 switch ( $action ) {
45 case 'show':
46 case 'destroy':
47 return self::$action();
48
49 default:
50 do_action( 'frm_entry_action_route', $action );
51 if ( apply_filters( 'frm_entry_stop_action_route', false, $action ) ) {
52 return;
53 }
54
55 return self::display_list();
56 }
57 }
58
59 /**
60 * Prevent the "screen options" tab from showing when
61 * editing or creating an entry
62 *
63 * @since 3.0
64 */
65 public static function remove_screen_options( $show_screen, $screen ) {
66 $menu_name = sanitize_title( FrmAppHelper::get_menu_name() );
67 if ( $screen->id == $menu_name . '_page_formidable-entries' ) {
68 $show_screen = false;
69 }
70
71 return $show_screen;
72 }
73
74 public static function manage_columns( $columns ) {
75 global $frm_vars;
76 $form_id = FrmForm::get_current_form_id();
77
78 $columns[ $form_id . '_id' ] = 'ID';
79 $columns[ $form_id . '_item_key' ] = esc_html__( 'Entry Key', 'formidable' );
80
81 if ( $form_id ) {
82 self::get_columns_for_form( $form_id, $columns );
83 } 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' );
87 }
88
89 $columns[ $form_id . '_created_at' ] = __( 'Entry creation date', 'formidable' );
90 $columns[ $form_id . '_updated_at' ] = __( 'Entry update date', 'formidable' );
91 self::maybe_add_ip_col( $form_id, $columns );
92
93 $frm_vars['cols'] = $columns;
94
95 $action = FrmAppHelper::simple_get( 'frm_action', 'sanitize_title' );
96 if ( FrmAppHelper::is_admin_page( 'formidable-entries' ) && in_array( $action, array( '', 'list', 'destroy' ) ) ) {
97 add_screen_option(
98 'per_page',
99 array(
100 'label' => __( 'Entries', 'formidable' ),
101 'default' => 20,
102 'option' => 'formidable_page_formidable_entries_per_page',
103 )
104 );
105 }
106
107 return $columns;
108 }
109
110 private static function get_columns_for_form( $form_id, &$columns ) {
111 $form_cols = FrmField::get_all_for_form( $form_id, '', 'include' );
112
113 /**
114 * Allows changing fields in the Entries list table heading.
115 *
116 * @since 5.0.04
117 *
118 * @param array $fields Array of fields.
119 * @param array $args The arguments. Contains `form_id`.
120 */
121 $form_cols = apply_filters( 'frm_fields_in_entries_list_table', $form_cols, compact( 'form_id' ) );
122
123 foreach ( $form_cols as $form_col ) {
124 if ( FrmField::is_no_save_field( $form_col->type ) ) {
125 continue;
126 }
127
128 $has_child_fields = $form_col->type == 'form' && isset( $form_col->field_options['form_select'] ) && ! empty( $form_col->field_options['form_select'] );
129 if ( $has_child_fields ) {
130 self::add_subform_cols( $form_col, $form_id, $columns );
131 } else {
132 self::add_field_cols( $form_col, $form_id, $columns );
133 }
134 }
135 }
136
137 /**
138 * @since 3.01
139 */
140 private static function add_subform_cols( $field, $form_id, &$columns ) {
141 $sub_form_cols = FrmField::get_all_for_form( $field->field_options['form_select'] );
142 if ( empty( $sub_form_cols ) ) {
143 return;
144 }
145
146 foreach ( $sub_form_cols as $k => $sub_form_col ) {
147 if ( FrmField::is_no_save_field( $sub_form_col->type ) ) {
148 unset( $sub_form_cols[ $k ] );
149 continue;
150 }
151 $columns[ $form_id . '_' . $sub_form_col->field_key . '-_-' . $field->id ] = FrmAppHelper::truncate( $sub_form_col->name, 35 );
152 unset( $sub_form_col );
153 }
154 }
155
156 /**
157 * @since 3.01
158 */
159 private static function add_field_cols( $field, $form_id, &$columns ) {
160 $col_id = $field->field_key;
161 if ( $field->form_id != $form_id ) {
162 $col_id .= '-_-form' . $field->form_id;
163 }
164
165 $has_separate_value = ! FrmField::is_option_empty( $field, 'separate_value' );
166 $is_post_status = FrmField::is_option_true( $field, 'post_field' ) && $field->field_options['post_field'] == 'post_status';
167 if ( $has_separate_value && ! $is_post_status ) {
168 $columns[ $form_id . '_frmsep_' . $col_id ] = FrmAppHelper::truncate( $field->name, 35 );
169 }
170
171 $columns[ $form_id . '_' . $col_id ] = FrmAppHelper::truncate( $field->name, 35 );
172 }
173
174 private static function maybe_add_ip_col( $form_id, &$columns ) {
175 if ( FrmAppHelper::ips_saved() ) {
176 $columns[ $form_id . '_ip' ] = 'IP';
177 }
178 }
179
180 public static function check_hidden_cols( $check, $object_id, $meta_key, $meta_value, $prev_value ) {
181 $this_page_name = self::hidden_column_key();
182 if ( $meta_key != $this_page_name || $meta_value == $prev_value ) {
183 return $check;
184 }
185
186 if ( empty( $prev_value ) ) {
187 $prev_value = get_metadata( 'user', $object_id, $meta_key, true );
188 }
189
190 global $frm_vars;
191 //add a check so we don't create a loop
192 $frm_vars['prev_hidden_cols'] = ( isset( $frm_vars['prev_hidden_cols'] ) && $frm_vars['prev_hidden_cols'] ) ? false : $prev_value;
193
194 return $check;
195 }
196
197 /**
198 * Add hidden columns back from other forms
199 */
200 public static function update_hidden_cols( $meta_id, $object_id, $meta_key, $meta_value ) {
201 $this_page_name = self::hidden_column_key();
202 if ( $meta_key != $this_page_name ) {
203 return;
204 }
205
206 global $frm_vars;
207 if ( ! isset( $frm_vars['prev_hidden_cols'] ) || ! $frm_vars['prev_hidden_cols'] ) {
208 return; // Don't continue if there's no previous value.
209 }
210
211 foreach ( $meta_value as $mk => $mv ) {
212 // Remove blank values.
213 if ( empty( $mv ) ) {
214 unset( $meta_value[ $mk ] );
215 }
216 }
217
218 $cur_form_prefix = reset( $meta_value );
219 $cur_form_prefix = explode( '_', $cur_form_prefix );
220 $cur_form_prefix = $cur_form_prefix[0];
221 $save = false;
222
223 foreach ( (array) $frm_vars['prev_hidden_cols'] as $prev_hidden ) {
224 if ( empty( $prev_hidden ) || in_array( $prev_hidden, $meta_value ) ) {
225 // Don't add blank cols or process included cols.
226 continue;
227 }
228
229 $form_prefix = explode( '_', $prev_hidden );
230 $form_prefix = $form_prefix[0];
231 if ( $form_prefix == $cur_form_prefix ) {
232 // Don't add back columns that are meant to be hidden.
233 continue;
234 }
235
236 $meta_value[] = $prev_hidden;
237 $save = true;
238 unset( $form_prefix );
239 }
240
241 if ( $save ) {
242 $user_id = get_current_user_id();
243 update_user_option( $user_id, $this_page_name, $meta_value, true );
244 }
245 }
246
247 /**
248 * @since 2.05.07
249 */
250 private static function hidden_column_key( $menu_name = '' ) {
251 $base = self::base_column_key( $menu_name );
252
253 return 'manage' . $base . 'columnshidden';
254 }
255
256 /**
257 * @since 2.05.07
258 */
259 private static function base_column_key( $menu_name = '' ) {
260 if ( empty( $menu_name ) ) {
261 $menu_name = FrmAppHelper::get_menu_name();
262 }
263
264 return sanitize_title( $menu_name ) . '_page_formidable-entries';
265 }
266
267 public static function save_per_page( $save, $option, $value ) {
268 if ( $option == 'formidable_page_formidable_entries_per_page' ) {
269 $save = (int) $value;
270 }
271
272 return $save;
273 }
274
275 public static function sortable_columns() {
276 $form_id = FrmForm::get_current_form_id();
277 $fields = FrmField::get_all_for_form( $form_id );
278
279 $columns = array(
280 $form_id . '_id' => 'id',
281 $form_id . '_created_at' => 'created_at',
282 $form_id . '_updated_at' => 'updated_at',
283 $form_id . '_ip' => 'ip',
284 $form_id . '_item_key' => 'item_key',
285 $form_id . '_is_draft' => 'is_draft',
286 );
287
288 foreach ( $fields as $field ) {
289 if ( self::field_supports_sorting( $field ) ) {
290 $columns[ $form_id . '_' . $field->field_key ] = 'meta_' . $field->id;
291 }
292 }
293
294 return $columns;
295 }
296
297 /**
298 * Can't sort on checkboxes because they are sorted serialized.
299 * Some post content can be sorted but not everything.
300 *
301 * @param stdClass $field
302 * @return bool
303 */
304 private static function field_supports_sorting( $field ) {
305 $is_sortable = 'checkbox' !== $field->type && empty( $field->field_options['post_field'] );
306 return apply_filters( 'frm_field_column_is_sortable', $is_sortable, $field );
307 }
308
309 /**
310 * @param mixed $result Option value from database for hidden columns in entries table.
311 * @return array
312 */
313 public static function hidden_columns( $result ) {
314 if ( ! is_array( $result ) ) {
315 // Force an unexpected value to be an array.
316 // Since $result is a filtered option and gets saved to the database, it's possible it could be a string.
317 // Since this code expects an array it would break with a "Uncaught Error: [] operator not supported for strings" error.
318 $result = array();
319 }
320
321 $form_id = FrmForm::get_current_form_id();
322
323 $hidden = self::user_hidden_columns_for_form( $form_id, $result );
324
325 global $frm_vars;
326 $i = isset( $frm_vars['cols'] ) ? count( $frm_vars['cols'] ) : 0;
327
328 if ( ! empty( $hidden ) ) {
329 $result = $hidden;
330 $i = $i - count( $result );
331 $max_columns = 11;
332 } else {
333 $max_columns = 8;
334 }
335
336 if ( $i <= $max_columns ) {
337 return $result;
338 }
339
340 self::remove_excess_cols( compact( 'i', 'max_columns', 'form_id' ), $result );
341
342 return $result;
343 }
344
345 /**
346 * @since 2.05.07
347 */
348 private static function user_hidden_columns_for_form( $form_id, $result ) {
349 $hidden = array();
350 foreach ( (array) $result as $r ) {
351 if ( ! empty( $r ) ) {
352 list( $form_prefix, $field_key ) = explode( '_', $r );
353
354 if ( (int) $form_prefix == (int) $form_id ) {
355 $hidden[] = $r;
356 }
357
358 unset( $form_prefix );
359 }
360 }
361
362 return $hidden;
363 }
364
365 /**
366 * Remove some columns by default when there are too many
367 *
368 * @since 2.05.07
369 */
370 private static function remove_excess_cols( $atts, &$result ) {
371 global $frm_vars;
372
373 $remove_first = array(
374 $atts['form_id'] . '_item_key' => '',
375 $atts['form_id'] . '_id' => '',
376 );
377 $cols = $remove_first + array_reverse( $frm_vars['cols'], true );
378
379 $i = $atts['i'];
380
381 foreach ( $cols as $col_key => $col ) {
382 if ( $i <= $atts['max_columns'] ) {
383 break;
384 }
385
386 if ( empty( $result ) || ! in_array( $col_key, $result, true ) ) {
387 $result[] = $col_key;
388 $i--;
389 }
390
391 unset( $col_key, $col );
392 }
393 }
394
395 public static function display_list( $message = '', $errors = array() ) {
396 global $wpdb, $frm_vars;
397
398 $form = FrmForm::maybe_get_current_form();
399 $params = FrmForm::get_admin_params( $form );
400
401 if ( $form ) {
402 $params['form'] = $form->id;
403 $frm_vars['current_form'] = $form;
404
405 self::get_delete_form_time( $form, $errors );
406 }
407
408 $table_class = apply_filters( 'frm_entries_list_class', 'FrmEntriesListHelper' );
409
410 $wp_list_table = new $table_class( array( 'params' => $params ) );
411
412 $pagenum = $wp_list_table->get_pagenum();
413
414 $wp_list_table->prepare_items();
415
416 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
417 if ( $pagenum > $total_pages && $total_pages > 0 ) {
418 $url = add_query_arg( 'paged', $total_pages );
419 if ( headers_sent() ) {
420 FrmAppHelper::js_redirect( $url, true );
421 } else {
422 wp_redirect( esc_url_raw( $url ) );
423 }
424 die();
425 }
426
427 if ( empty( $message ) && isset( $_GET['import-message'] ) ) {
428 $message = __( 'Your import is complete', 'formidable' );
429 }
430
431 require FrmAppHelper::plugin_path() . '/classes/views/frm-entries/list.php';
432 }
433
434 private static function get_delete_form_time( $form, &$errors ) {
435 if ( 'trash' == $form->status ) {
436 $delete_timestamp = time() - ( DAY_IN_SECONDS * EMPTY_TRASH_DAYS );
437 $time_to_delete = FrmAppHelper::human_time_diff( $delete_timestamp, ( isset( $form->options['trash_time'] ) ? ( $form->options['trash_time'] ) : time() ) );
438
439 /* translators: %1$s: Time string */
440 $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 }
442 }
443
444 /* Back End CRUD */
445 public static function show( $id = 0 ) {
446 FrmAppHelper::permission_check( 'frm_view_entries' );
447
448 if ( ! $id ) {
449 $id = FrmAppHelper::get_param( 'id', 0, 'get', 'absint' );
450
451 if ( ! $id ) {
452 $id = FrmAppHelper::get_param( 'item_id', 0, 'get', 'absint' );
453 }
454 }
455
456 $entry = FrmEntry::getOne( $id, true );
457 if ( ! $entry ) {
458 echo '<div id="form_show_entry_page" class="wrap">' .
459 esc_html__( 'You are trying to view an entry that does not exist.', 'formidable' ) .
460 '</div>';
461
462 return;
463 }
464
465 $data = $entry->description;
466 if ( ! is_array( $data ) || ! isset( $data['referrer'] ) ) {
467 $data = array( 'referrer' => $data );
468 }
469
470 $fields = FrmField::get_all_for_form( $entry->form_id, '', 'include' );
471 $form = FrmForm::getOne( $entry->form_id );
472
473 include( FrmAppHelper::plugin_path() . '/classes/views/frm-entries/show.php' );
474 }
475
476 public static function destroy() {
477 FrmAppHelper::permission_check( 'frm_delete_entries' );
478
479 $params = FrmForm::get_admin_params();
480
481 if ( isset( $params['keep_post'] ) && $params['keep_post'] ) {
482 self::unlink_post( $params['id'] );
483 }
484
485 $message = '';
486 if ( FrmEntry::destroy( $params['id'] ) ) {
487 $message = __( 'Entry was successfully deleted', 'formidable' );
488 }
489
490 self::display_list( $message );
491 }
492
493 /**
494 * @deprecated 4.02.04 - Moved to Pro since it was unused in Lite.
495 */
496 public static function destroy_all() {
497 _deprecated_function( __METHOD__, '4.02.04', 'FrmProEntriesController::destroy_all' );
498 if ( is_callable( 'FrmProEntriesController::destroy_all' ) ) {
499 FrmProEntriesController::destroy_all();
500 }
501 }
502
503 public static function process_entry( $errors = '', $ajax = false ) {
504 $form_id = FrmAppHelper::get_post_param( 'form_id', '', 'absint' );
505 if ( FrmAppHelper::is_admin() || empty( $_POST ) || empty( $form_id ) || ! isset( $_POST['item_key'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
506 return;
507 }
508
509 global $frm_vars;
510
511 $form = FrmForm::getOne( $form_id );
512 if ( ! $form ) {
513 return;
514 }
515
516 $params = FrmForm::get_params( $form );
517
518 if ( ! isset( $frm_vars['form_params'] ) ) {
519 $frm_vars['form_params'] = array();
520 }
521 $frm_vars['form_params'][ $form->id ] = $params;
522
523 if ( isset( $frm_vars['created_entries'][ $form_id ] ) ) {
524 return;
525 }
526
527 if ( $errors == '' && ! $ajax ) {
528 $errors = FrmEntryValidate::validate( wp_unslash( $_POST ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
529 }
530
531 /**
532 * Use this filter to add trigger actions and add errors after
533 * all other errors have been processed
534 *
535 * @since 2.0.6
536 */
537 $errors = apply_filters( 'frm_entries_before_create', $errors, $form );
538
539 $frm_vars['created_entries'][ $form_id ] = array( 'errors' => $errors );
540
541 if ( empty( $errors ) ) {
542 $_POST['frm_skip_cookie'] = 1;
543 $do_success = false;
544 if ( $params['action'] === 'create' ) {
545 if ( apply_filters( 'frm_continue_to_create', true, $form_id ) && ! isset( $frm_vars['created_entries'][ $form_id ]['entry_id'] ) ) {
546 $frm_vars['created_entries'][ $form_id ]['entry_id'] = FrmEntry::create( $_POST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
547
548 $params['id'] = $frm_vars['created_entries'][ $form_id ]['entry_id'];
549 $do_success = true;
550 }
551 }
552
553 do_action( 'frm_process_entry', $params, $errors, $form, array( 'ajax' => $ajax ) );
554 if ( $do_success ) {
555 FrmFormsController::maybe_trigger_redirect( $form, $params, array( 'ajax' => $ajax ) );
556 }
557 unset( $_POST['frm_skip_cookie'] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
558 }
559 }
560
561 /**
562 * Escape url entities before redirect
563 *
564 * @since 3.0
565 *
566 * @param string $url
567 *
568 * @return string
569 */
570 public static function prepare_redirect_url( $url ) {
571 return str_replace( array( ' ', '[', ']', '|', '@' ), array( '%20', '%5B', '%5D', '%7C', '%40' ), $url );
572 }
573
574 public static function delete_entry_before_redirect( $url, $form, $atts ) {
575 self::_delete_entry( $atts['id'], $form );
576
577 return $url;
578 }
579
580 /**
581 * Delete entry if not redirected.
582 *
583 * @param array $atts
584 */
585 public static function delete_entry_after_save( $atts ) {
586 self::_delete_entry( $atts['entry_id'], $atts['form'] );
587 }
588
589 private static function _delete_entry( $entry_id, $form ) {
590 if ( ! $form ) {
591 return;
592 }
593
594 FrmAppHelper::unserialize_or_decode( $form->options );
595 if ( isset( $form->options['no_save'] ) && $form->options['no_save'] ) {
596 self::unlink_post( $entry_id );
597 FrmEntry::destroy( $entry_id );
598 }
599 }
600
601 /**
602 * Unlink entry from post
603 */
604 private static function unlink_post( $entry_id ) {
605 global $wpdb;
606 $wpdb->update( $wpdb->prefix . 'frm_items', array( 'post_id' => '' ), array( 'id' => $entry_id ) );
607 FrmEntry::clear_cache();
608 }
609
610 /**
611 * @param $atts
612 *
613 * @return array|string
614 */
615 public static function show_entry_shortcode( $atts ) {
616 $defaults = array(
617 'id' => false,
618 'entry' => false,
619 'fields' => false,
620 'plain_text' => false,
621 'user_info' => false,
622 'include_blank' => false,
623 'default_email' => false,
624 'form_id' => false,
625 'format' => 'text',
626 'array_key' => 'key',
627 'direction' => 'ltr',
628 'font_size' => '',
629 'text_color' => '',
630 'border_width' => '',
631 'border_color' => '',
632 'bg_color' => '',
633 'alt_bg_color' => '',
634 'class' => '',
635 'clickable' => false,
636 'exclude_fields' => '',
637 'include_fields' => '',
638 'include_extras' => '',
639 'inline_style' => 1,
640 'child_array' => false, // return embedded fields as nested array
641 'line_breaks' => true,
642 'array_separator' => ', ',
643 );
644 $defaults = apply_filters( 'frm_show_entry_defaults', $defaults );
645
646 $atts = shortcode_atts( $defaults, $atts );
647
648 if ( $atts['default_email'] ) {
649 $shortcode_atts = array(
650 'format' => $atts['format'],
651 'plain_text' => $atts['plain_text'],
652 );
653
654 $entry_formatter = FrmEntryFactory::entry_shortcode_formatter_instance( $atts['form_id'], $shortcode_atts );
655 $formatted_entry = $entry_formatter->content();
656
657 } else {
658
659 $entry_formatter = FrmEntryFactory::entry_formatter_instance( $atts );
660 $formatted_entry = $entry_formatter->get_formatted_entry_values();
661
662 }
663
664 return $formatted_entry;
665 }
666
667 public static function entry_sidebar( $entry = false ) {
668 $data = array();
669 $id = 0;
670
671 $date_format = get_option( 'date_format' );
672 $time_format = get_option( 'time_format' );
673
674 if ( $entry ) {
675 $id = $entry->id;
676 $data = $entry->description;
677 if ( isset( $data['browser'] ) ) {
678 $browser = FrmEntriesHelper::get_browser( $data['browser'] );
679 }
680 /**
681 * Add or remove information in the entry sidebar.
682 *
683 * @since 5.5.2
684 * @param array $data
685 */
686 $data = apply_filters( 'frm_sidebar_data', $data, compact( 'entry' ) );
687 }
688
689 include( FrmAppHelper::plugin_path() . '/classes/views/frm-entries/sidebar-shared.php' );
690 }
691
692 /**
693 * @deprecated 4.0
694 */
695 public static function contextual_help( $help, $screen_id, $screen ) {
696 _deprecated_function( __METHOD__, '4.0' );
697 return $help;
698 }
699
700 /**
701 * @deprecated 1.07.05
702 * @codeCoverageIgnore
703 */
704 public static function show_form( $id = '', $key = '', $title = false, $description = false ) {
705 return FrmDeprecated::show_form( $id, $key, $title, $description );
706 }
707
708 /**
709 * @deprecated 1.07.05
710 * @codeCoverageIgnore
711 */
712 public static function get_form( $filename, $form, $title, $description ) {
713 return FrmDeprecated::get_form( $filename, $form, $title, $description );
714 }
715 }
716