PluginProbe
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz / 1.13.0
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz v1.13.0
2.12.6 2.12.5 2.12.4 2.12.3 2.12.2 2.12.1 2.12.0 2.11.1 2.11.0 2.10.1 2.10.0 2.9.1 2.9.0 2.8.2 2.8.1 2.7.0 2.7.1 2.8.0 trunk 0.0.10 0.0.11 0.0.12 0.0.13 0.0.2 0.0.3 All 96 releases
sureforms / admin / views / single-entry.php

single-entry.php in SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz 1.13.0, at admin/views/single-entry.php

621 lines 21.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * SureForms Single Entries Page.
4 *
5 * @since 0.0.13
6 * @package sureforms.
7 */
8
9 namespace SRFM\Admin\Views;
10
11 use SRFM\Inc\Database\Tables\Entries;
12 use SRFM\Inc\Helper;
13
14 /**
15 * Exit if accessed directly.
16 */
17 if ( ! defined( 'ABSPATH' ) ) {
18 exit;
19 }
20
21 /**
22 * Single entry page.
23 *
24 * @since 0.0.13
25 */
26 class Single_Entry {
27 /**
28 * Stores the entry ID.
29 *
30 * @var string|null $entry_id ID for the specific entry.
31 * @since 0.0.13
32 */
33 private $entry_id;
34
35 /**
36 * Stores the entry data for the specified entry ID.
37 *
38 * @var array<mixed>|null $entry Entry data for the specified entry ID.
39 * @since 0.0.13
40 */
41 private $entry;
42
43 /**
44 * Initialize the properties.
45 *
46 * @since 0.0.13
47 */
48 public function __construct() {
49 if ( isset( $_GET['_wpnonce'] ) && ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ), 'srfm_entries_action' ) ) {
50 return;
51 }
52 $this->entry_id = isset( $_GET['entry_id'] ) ? intval( sanitize_text_field( wp_unslash( $_GET['entry_id'] ) ) ) : null;
53 $this->entry = $this->entry_id ? Entries::get( $this->entry_id ) : null;
54 }
55
56 /**
57 * Render the single entry page if an entry is found.
58 *
59 * @since 0.0.13
60 * @return void
61 */
62 public function render() {
63 if ( ! $this->entry ) {
64 return;
65 }
66 $entry_status = $this->entry['status'];
67 $submitted_on = gmdate( 'Y/m/d \a\t g:i a', strtotime( $this->entry['created_at'] ) );
68 // Translators: %d is the form ID.
69 $form_name = ! empty( get_the_title( $this->entry['form_id'] ) ) ? get_the_title( $this->entry['form_id'] ) : sprintf( esc_html__( 'SureForms Form #%d', 'sureforms' ), intval( $this->entry['form_id'] ) );
70 $meta_data = $this->entry['form_data'];
71 $excluded_fields = [ 'srfm-honeypot-field', 'g-recaptcha-response', 'srfm-sender-email-field' ];
72 ?>
73 <div class="wrap">
74 <h1 class="wp-heading-inline">
75 <?php
76 /* Translators: %s is the entry id. */
77 printf( esc_html__( 'Entry #%s', 'sureforms' ), esc_html( $this->entry_id ) );
78 ?>
79 </h1>
80
81 <form method="post" action="<?php echo esc_url( admin_url( "admin.php?page=sureforms_entries&entry_id={$this->entry_id}&view=details" ) ); ?>"> <!-- check for nonce, referrer, etc. -->
82 <?php
83 /**
84 * Action hook right after entry form opening tag.
85 *
86 * @since 1.3.0
87 */
88 do_action( 'srfm_after_entry_form_opening_tag', $this->entry, $this );
89 ?>
90
91 <div id="poststuff">
92 <div id="post-body" class="metabox-holder columns-2">
93 <div id="postbox-container-1" class="postbox-container">
94 <?php
95 /**
96 * Action hook right before entry form opening tag.
97 *
98 * @since 1.3.0
99 */
100 do_action( 'srfm_before_entry_submission_info', $this->entry, $this );
101 $this->render_upsell_placeholder( 'notes' );
102
103 /**
104 * Action hook right after the entry notes.
105 *
106 * @since 1.9.0
107 */
108 do_action( 'srfm_after_entry_notes', $this->entry, $this );
109
110 $this->render_submission_info( $form_name, $entry_status, $submitted_on );
111
112 /**
113 * Action hook right after entry form opening tag.
114 *
115 * @since 1.3.0
116 */
117 do_action( 'srfm_after_entry_submission_info', $this->entry, $this );
118 $this->render_upsell_placeholder( 'resend-notification' );
119 ?>
120 </div>
121 <div id="postbox-container-2" class="postbox-container">
122 <?php $this->render_form_data( $meta_data, $excluded_fields ); ?>
123 </div>
124 <div id="postbox-container-3" class="postbox-container">
125 <?php $this->render_entry_logs( $this->entry['logs'] ); ?>
126 </div>
127 </div><!-- /post-body -->
128 <br class="clear">
129 </div>
130 <!-- /poststuff -->
131
132 <?php
133 /**
134 * Action hook right before entry form closing tag.
135 *
136 * @since 1.3.0
137 */
138 do_action( 'srfm_before_entry_form_closing_tag', $this->entry, $this );
139 ?>
140 </form>
141 </div>
142 <?php
143 }
144
145 /**
146 * Add tooltip wrapper.
147 *
148 * @param string $position Tooltip position.
149 * @param callable $element_cb Element callback.
150 * @param callable $tooltip_cb Tooltip callback.
151 * @since 1.3.0
152 * @return void
153 */
154 protected function add_tooltip( $position, $element_cb, $tooltip_cb ) {
155 $upsell_url = Helper::get_sureforms_website_url( 'pricing', [ 'utm_medium' => 'srfm_entries_management' ] );
156 ?>
157 <div class="srfm-tooltip">
158 <?php call_user_func( $element_cb ); ?>
159 <div class="tooltip-wrap <?php echo esc_attr( $position ); ?>">
160 <div class="tooltip-content">
161 <div class="tooltip-text">
162 <?php call_user_func( $tooltip_cb ); ?>
163 </div>
164 <a target="_blank" href="<?php echo esc_url( $upsell_url ); ?>"><?php esc_html_e( 'Upgrade', 'sureforms' ); ?></a>
165 </div>
166 <i></i>
167 </div>
168 </div>
169 <?php
170 }
171
172 /**
173 * Renders the upsell placeholder.
174 *
175 * @param string $for The placeholder type.
176 * @since 1.3.0
177 * @return void
178 */
179 protected function render_upsell_placeholder( $for ) {
180 if ( Helper::has_pro() ) {
181 return;
182 }
183
184 switch ( $for ) {
185 case 'edit-button':
186 $position = 'top';
187 $element_cb = static function() {
188 ?>
189 <button class="button button-link srfm-edit-entry" type="button">
190 <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
191 <path d="M11.2411 2.99111L12.3661 1.86612C12.8543 1.37796 13.6457 1.37796 14.1339 1.86612C14.622 2.35427 14.622 3.14573 14.1339 3.63388L7.05479 10.713C6.70234 11.0654 6.26762 11.3245 5.78993 11.4668L4 12L4.53319 10.2101C4.67548 9.73239 4.93456 9.29767 5.28701 8.94522L11.2411 2.99111ZM11.2411 2.99111L13 4.74999M12 9.33333V12.5C12 13.3284 11.3284 14 10.5 14H3.5C2.67157 14 2 13.3284 2 12.5V5.49999C2 4.67157 2.67157 3.99999 3.5 3.99999H6.66667" stroke="#2271b1" stroke-linecap="round" stroke-linejoin="round"/>
192 </svg>
193 <?php esc_html_e( 'Edit', 'sureforms' ); ?>
194 </button>
195 <?php
196 };
197 $tooltip_cb = static function() {
198 ?>
199 <h3><?php esc_html_e( 'Unlock Edit Form Entires', 'sureforms' ); ?></h3>
200 <p><?php esc_html_e( 'With the SureForms Starter plan, you can easily edit your entries to suit your needs.', 'sureforms' ); ?></p>
201 <?php
202 };
203 break;
204
205 case 'resend-notification':
206 $position = 'left';
207 $element_cb = static function() {
208 ?>
209 <button type="button" class="button srfm-resend-notification-trigger-btn"><?php esc_html_e( 'Resend Notification', 'sureforms' ); ?></button>
210 <?php
211 };
212 $tooltip_cb = static function() {
213 ?>
214 <h3><?php esc_html_e( 'Unlock Resend Email Notification', 'sureforms' ); ?></h3>
215 <p><?php esc_html_e( 'With the SureForms Starter plan, you can effortlessly resend email notifications, ensuring your important updates reach their recipients with ease.', 'sureforms' ); ?></p>
216 <?php
217 };
218 break;
219
220 case 'notes':
221 $position = 'left';
222 $element_cb = static function() {
223 ?>
224 <div id="submitdiv" class="postbox entry-notes">
225 <div class="postbox-header">
226 <h2><?php esc_html_e( 'Entry Notes', 'sureforms' ); ?></h2>
227 <button type="button" id="srfm-add-entry-note" class="srfm-add-entry-note-button">
228 <?php esc_html_e( 'Add Note', 'sureforms' ); ?>
229 <svg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M8 3.33594V12.6693' stroke='black' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/><path d='M3.33337 8H12.6667' stroke='black' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/></svg>
230 </button>
231 </div>
232 <div class="inside">
233 <div class="srfm-entry-note-wrapper">
234 <div class="entry-notes-container"></div>
235 <div class="add-notes-field">
236 <textarea disabled id="srfm-entry-note" rows="5"></textarea>
237 <button id="srfm-add-note" type="button" class="button"><?php esc_html_e( 'Submit Note', 'sureforms' ); ?></button>
238 </div>
239 </div>
240 </div>
241 </div>
242 <?php
243 };
244 $tooltip_cb = static function() {
245 ?>
246 <h3><?php esc_html_e( 'Unlock Add Note', 'sureforms' ); ?></h3>
247 <p><?php esc_html_e( 'With the SureForms Starter plan, enhance your submitted form entries by adding personalized notes for better clarity and tracking.', 'sureforms' ); ?></p>
248 <?php
249 };
250 break;
251
252 default:
253 // Do nothing.
254 return;
255 }
256
257 $this->add_tooltip( $position, $element_cb, $tooltip_cb );
258 }
259
260 /**
261 * Render the submission information for a specific entry.
262 *
263 * @param string $form_name The form title/name.
264 * @param string $entry_status The entry status (read/unread).
265 * @param string $submitted_on The submission date.
266 * @since 0.0.13
267 * @return void
268 */
269 private function render_submission_info( $form_name, $entry_status, $submitted_on ) {
270 $mark_as_unread_url = add_query_arg( 'action', 'unread' );
271 $user_id = Helper::get_integer_value( $this->entry['user_id'] );
272 $user_info = 0 !== $user_id ? get_userdata( $user_id ) : null;
273 $user_name = $user_info ? $user_info->display_name : '';
274 $user_profile_url = $user_info ? get_author_posts_url( $user_id ) : '';
275 ?>
276 <div id="sureform_form_name_meta" class="postbox ">
277 <div class="postbox-header">
278 <!-- Removed "hndle ui-sortable-handle" class from h2 to remove the draggable stylings. -->
279 <h2><?php esc_html_e( 'Submission Info', 'sureforms' ); ?></h2>
280 </div>
281 <div class="inside">
282 <table style="border-collapse: separate; border-spacing: 5px 5px;">
283 <tbody>
284 <!-- TODO: Add Type and User info. -->
285 <tr>
286 <td><b><?php esc_html_e( 'Entry:', 'sureforms' ); ?></b></td>
287 <td>#<?php echo esc_attr( $this->entry_id ); ?></td>
288 </tr>
289 <tr>
290 <td><b><?php esc_html_e( 'Form Name:', 'sureforms' ); ?></b></td>
291 <td><a target="_blank" rel="noopener" href="<?php the_permalink( $this->entry['form_id'] ); ?>"><?php echo esc_attr( $form_name ); ?></a></td>
292 </tr>
293 <?php if ( ! empty( $this->entry['submission_info']['user_ip'] ) ) { ?>
294 <tr>
295 <td><b><?php esc_html_e( 'User IP:', 'sureforms' ); ?></b></td>
296 <td><a target="_blank" rel="noopener" href="https://ipinfo.io/"><?php echo esc_attr( $this->entry['submission_info']['user_ip'] ); ?></a></td>
297 </tr>
298 <?php } ?>
299 <tr>
300 <td><b><?php esc_html_e( 'Browser:', 'sureforms' ); ?></b></td>
301 <td><?php echo esc_attr( $this->entry['submission_info']['browser_name'] ); ?></td>
302 </tr>
303 <tr>
304 <td><b><?php esc_html_e( 'Device:', 'sureforms' ); ?></b></td>
305 <td><?php echo esc_attr( $this->entry['submission_info']['device_name'] ); ?></td>
306 </tr>
307 <?php if ( 0 !== $user_id ) { ?>
308 <tr>
309 <td><b><?php esc_html_e( 'User:', 'sureforms' ); ?></b></td>
310 <td><a target="_blank" rel="noopener" href="<?php echo esc_url( $user_profile_url ); ?>"><?php echo esc_attr( $user_name ); ?></a></td>
311 </tr>
312 <?php } ?>
313 <tr>
314 <td><b><?php esc_html_e( 'Status:', 'sureforms' ); ?></b></td>
315 <td>
316 <span style="text-transform: capitalize;">
317 <?php echo esc_attr( $entry_status ); ?>
318 </span>
319 <?php if ( 'read' === $entry_status ) { ?>
320 <span> | <a href="<?php echo esc_url( $mark_as_unread_url ); ?>" id="srfm-entry-mark-unread" style="font-size: 12px;"><?php esc_html_e( 'Mark as Unread', 'sureforms' ); ?></a></span>
321 <?php } ?>
322 </td>
323 </tr>
324 <tr>
325 <td><b><?php esc_html_e( 'Submitted On:', 'sureforms' ); ?></b></td>
326 <td><?php echo esc_attr( $submitted_on ); ?></td>
327 </tr>
328 </tbody>
329 </table>
330 </div>
331 </div>
332 <?php
333 }
334
335 /**
336 * Render the form data for a specific entry.
337 *
338 * @param array<mixed> $meta_data The form meta data.
339 * @param array<string> $excluded_fields Fields to exlude from display.
340 * @since 0.0.13
341 * @return void
342 */
343 private function render_form_data( $meta_data, $excluded_fields ) {
344 ?>
345 <div id="sureform_entry_meta" class="postbox srfm-form-data">
346 <div class="postbox-header">
347 <!-- Removed "hndle ui-sortable-handle" class from h2 to remove the draggable stylings. -->
348 <h2><?php esc_html_e( 'Form Data', 'sureforms' ); ?></h2>
349 <?php
350 /**
351 * Action hook right after entry form opening tag.
352 *
353 * @since 1.3.0
354 */
355 do_action( 'srfm_after_entry_postbox_title', $this->entry, $this );
356 $this->render_upsell_placeholder( 'edit-button' );
357 ?>
358 </div>
359 <div class="inside">
360 <style>
361 .file-cards-container {
362 display: flex;
363 flex-wrap: wrap;
364 gap: 10px;
365 }
366 .file-card {
367 border: 1px solid #ddd;
368 border-radius: 4px;
369 padding: 10px;
370 width: 100px; /* Reduced width */
371 text-align: center;
372 background: #f9f9f9;
373 font-size: 12px; /* Reduced font size for smaller cards */
374 }
375 .file-card-image img {
376 max-width: 80px; /* Reduced max width */
377 max-height: 80px; /* Reduced max height */
378 object-fit: cover;
379 }
380 .file-card-icon {
381 font-size: 24px; /* Reduced icon size */
382 margin-bottom: 5px;
383 }
384 .file-card-details {
385 margin-bottom: 5px;
386 font-weight: bold;
387 }
388 .file-card-url a {
389 color: #007bff;
390 text-decoration: none;
391 font-size: 12px; /* Reduced font size */
392 }
393 .file-card-url a:hover {
394 text-decoration: underline;
395 }
396 </style>
397 <table class="widefat striped">
398 <tbody>
399 <tr>
400 <th><b><?php esc_html_e( 'Fields', 'sureforms' ); ?></b></th>
401 <th><b><?php esc_html_e( 'Values', 'sureforms' ); ?></b></th>
402 </tr>
403 <?php
404 foreach ( $meta_data as $field_name => $value ) {
405 if ( in_array( $field_name, $excluded_fields, true ) ) {
406 continue;
407 }
408 if ( false === str_contains( $field_name, '-lbl-' ) ) {
409 continue;
410 }
411 $label = explode( '-lbl-', $field_name )[1];
412 // Getting the encrypted label. we are removing the block slug here.
413 $label = explode( '-', $label )[0];
414
415 $label = $label ? Helper::decrypt( $label ) : '';
416
417 $field_block_name = Helper::get_block_name_from_field( $field_name );
418
419 /**
420 * Fires before rendering a field in the entry details view.
421 *
422 * This action allows other packages (like Pro, Business) to process and render fields
423 * with custom data structures that the core plugin cannot handle. Since the core plugin
424 * does not know the structure of data from other packages, this action provides a way
425 * for those packages to properly process and display their field data.
426 *
427 * @since 1.11.0
428 *
429 * @param array $field_data Field data containing:
430 * 'value' => mixed The field value
431 * 'label' => string The field name/key
432 * 'block_name' => string The block type identifier
433 * 'processed_label' => string The decrypted human readable label
434 */
435 do_action(
436 'srfm_entry_render_field',
437 [
438 'value' => $value,
439 'label' => $field_name,
440 'block_name' => $field_block_name,
441 'processed_label' => $label,
442 ]
443 );
444
445 /**
446 * Filters whether to add a field row in the entry details table.
447 *
448 * This filter allows skipping rows for fields that cannot be processed with the
449 * core plugin's structure. Fields from other packages may have complex data structures
450 * that could cause fatal errors if processed normally. Those packages can use the
451 * 'srfm_entry_render_field' action to render their fields and return false here
452 * to prevent the core plugin from attempting to process them.
453 *
454 * @since 1.11.0
455 *
456 * @param bool $should_add_field_row Whether to add the field row. Default true.
457 * @param array $field_data Field data containing:
458 * 'value' => mixed The field value
459 * 'field_name' => string The field name/key
460 * 'block_name' => string The block type identifier
461 *
462 * @return bool Whether to add the field row to the table.
463 */
464 $should_add_field_row = apply_filters(
465 'srfm_should_add_field_row',
466 true,
467 [
468 'value' => $value,
469 'field_name' => $field_name,
470 'block_name' => $field_block_name,
471 ]
472 );
473
474 if ( true !== $should_add_field_row ) {
475 continue;
476 }
477
478 if ( ! Helper::has_pro() && 'srfm-repeater' === $field_block_name ) {
479 continue;
480 }
481
482 ?>
483 <tr>
484 <td style="word-break: break-word;"><b><?php echo $label ? wp_kses_post( $label ) : ''; ?></b></td>
485 <?php
486 if ( false !== strpos( $field_name, 'srfm-upload' ) ) {
487 ?>
488 <td>
489 <div class="file-cards-container">
490 <?php
491 $upload_values = $value;
492 if ( ! empty( $upload_values ) && is_array( $upload_values ) ) {
493 foreach ( $upload_values as $file_url ) {
494 $file_url = urldecode( Helper::get_string_value( $file_url ) );
495
496 if ( ! empty( $file_url ) ) {
497 if ( ! file_exists( Helper::convert_fileurl_to_filepath( $file_url ) ) ) {
498 continue;
499 }
500
501 $file_type = pathinfo( $file_url, PATHINFO_EXTENSION );
502 $is_image = in_array( $file_type, [ 'gif', 'png', 'bmp', 'jpg', 'jpeg', 'svg' ], true );
503 ?>
504 <div class="file-card" data-fileurl-hash="<?php echo esc_attr( md5( $file_url ) ); ?>">
505 <?php if ( $is_image ) { ?>
506 <div class="file-card-image">
507 <a target="_blank" href="<?php echo esc_url( $file_url ); ?>">
508 <img src="<?php echo esc_url( $file_url ); ?>" alt="<?php esc_attr_e( 'Image', 'sureforms' ); ?>" />
509 </a>
510 </div>
511 <?php } else { ?>
512 <div class="file-card-icon">
513 <?php // Display a file icon for non-image files. ?>
514 <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M4 16.333V4.667a1.333 1.333 0 011.333-1.333h13.334a1.333 1.333 0 011.333 1.333v11.666a1.333 1.333 0 01-1.333 1.333H5.333A1.333 1.333 0 014 16.333zm8-8h2v6h-2v-6zm-2 8h6v2H10v-2zm-6-6h4v6H4v-6zm0-4h16v2H4V6z"/></svg>
515 </div>
516 <div class="file-card-details">
517 <span><?php echo esc_html( strtoupper( $file_type ) ); ?></span>
518 </div>
519 <?php } ?>
520 <div class="file-card-url">
521 <a target="_blank" href="<?php echo esc_url( $file_url ); ?>"><?php echo esc_html__( 'Open', 'sureforms' ); ?></a>
522 </div>
523 </div>
524 <?php
525 }
526 }
527 }
528 ?>
529 </div>
530 </td>
531 <?php } elseif ( false !== strpos( $field_name, 'srfm-url' ) ) { ?>
532 <td><a target="_blank" href="<?php echo esc_url( $value ); ?>"><?php echo esc_url( $value ); ?></a></td>
533 <?php
534 // we need to html_entity_decode the value to display the html content. and check field textarea.
535 } elseif ( strpos( $field_name, 'srfm-textarea' ) !== false ) {
536 ?>
537 <td><div class='sureform_entry_meta_textarea'><?php echo Helper::esc_textarea( html_entity_decode( $value ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- using a custom escaping function. ?></div></td>
538 <?php } elseif ( apply_filters( 'srfm_entry_render_field_custom_value', false, $field_name ) ) { ?>
539 <?php echo wp_kses_post( apply_filters( 'srfm_entry_custom_value', '', $value ) ); ?>
540 <?php } else { ?>
541 <td><?php echo false !== strpos( $value, PHP_EOL ) ? wp_kses_post( wpautop( $value ) ) : wp_kses_post( $value ); ?></td>
542 <?php } ?>
543 </tr>
544 <?php } ?>
545 </tbody>
546 </table>
547 </div>
548 </div>
549 <?php
550 }
551 /**
552 * Render the entry logs for a specific entry.
553 *
554 * @param array<mixed> $entry_logs Entry logs stored in the database.
555 * @since 0.0.13
556 * @return void
557 */
558 private function render_entry_logs( $entry_logs ) {
559 ob_start();
560 ?>
561 <div id="sureform_entry_meta" class="postbox srfm-entry-logs">
562 <div class="postbox-header">
563 <!-- Removed "hndle ui-sortable-handle" class from h2 to remove the draggable stylings. -->
564 <h2><?php esc_html_e( 'Entry Logs', 'sureforms' ); ?></h2>
565 </div>
566 <div class="inside">
567 <table class="striped entry-logs-table">
568 <tbody>
569 <?php if ( ! empty( $entry_logs ) ) { ?>
570 <?php foreach ( $entry_logs as $log ) { ?>
571 <tr>
572 <td class="entry-log-container">
573 <div class="entry-log">
574 <h4 class="entry-log-title">
575 <?php echo esc_html( $log['title'] ); ?>
576 <?php echo esc_html( gmdate( '\a\t Y-m-d H:i:s', $log['timestamp'] ) ); ?>
577 </h4>
578 <div class="entry-log-messages">
579 <?php foreach ( $log['messages'] as $message ) { ?>
580 <p><?php echo wp_kses_post( $message ); ?></p>
581 <?php } ?>
582 </div>
583 </div>
584 </td>
585 </tr>
586 <?php } ?>
587 <?php } else { ?>
588 <p class="no-logs-found"><?php esc_html_e( 'No logs found for this entry.', 'sureforms' ); ?></p>
589 <?php } ?>
590 </tbody>
591 </table>
592 </div>
593 </div>
594 <?php
595 $content = ob_get_clean();
596
597 $allowed_tags = array_merge(
598 wp_kses_allowed_html( 'post' ),
599 [
600 'svg' => [
601 'width' => true,
602 'height' => true,
603 'fill' => true,
604 'viewbox' => true,
605 'xmlns' => true,
606 ],
607 'path' => [
608 'd' => true,
609 'opacity' => true,
610 'class' => true,
611 'stroke-width' => true,
612 'stroke-linecap' => true,
613 'stroke-linejoin' => true,
614 ],
615 ]
616 );
617
618 echo wp_kses( apply_filters( 'srfm_entry_logs_markup', $content, $entry_logs ), $allowed_tags );
619 }
620 }
621