PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
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 / views / frm-entries / sidebar-shared.php

sidebar-shared.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More trunk, at classes/views/frm-entries/sidebar-shared.php

159 lines 5.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Shared entry sidebar.
4 *
5 * @package Formidable
6 *
7 * @var string $id Entry ID.
8 * @var stdClass $entry Entry object.
9 * @var string|null $browser Browser info string if available.
10 * @var array|null $data Additional entry meta data (referrer, user_journey, etc.).
11 */
12
13 if ( ! defined( 'ABSPATH' ) ) {
14 die( 'You are not allowed to call this page directly.' );
15 }
16 ?>
17 <div class="frm_with_icons frm_no_print">
18 <h3>
19 <?php esc_html_e( 'Entry Actions', 'formidable' ); ?>
20 </h3>
21 <div class="inside">
22 <?php FrmEntriesHelper::actions_dropdown( compact( 'id', 'entry' ) ); ?>
23 <?php do_action( 'frm_entry_major_pub', $entry ); ?>
24 <div class="clear"></div>
25
26 <?php if ( has_action( 'frm_show_entry_publish_box' ) ) { ?>
27 <div id="minor-publishing" class="frm_remove_border">
28 <div class="misc-pub-section">
29 <?php do_action( 'frm_show_entry_publish_box', $entry ); ?>
30 <div class="clear"></div>
31 </div>
32 </div>
33 <?php } ?>
34 </div>
35 </div>
36
37 <div class="frm_with_icons">
38 <h3>
39 <?php esc_html_e( 'Entry Details', 'formidable' ); ?>
40 </h3>
41 <div class="inside">
42 <?php require FrmAppHelper::plugin_path() . '/classes/views/frm-entries/_sidebar-shared-pub.php'; ?>
43
44 <?php if ( $entry->post_id ) { ?>
45 <div class="misc-pub-section frm_no_print">
46 <?php FrmAppHelper::icon_by_class( 'frmfont frm_calendar_icon', array( 'aria-hidden' => 'true' ) ); ?>
47 <?php esc_html_e( 'Post', 'formidable' ); ?>:
48 <b><?php echo esc_html( get_the_title( $entry->post_id ) ); ?></b>
49 <span>
50 <a href="<?php echo esc_url( admin_url( 'post.php?post=' . $entry->post_id . '&action=edit' ) ); ?>">
51 <?php esc_html_e( 'Edit', 'formidable' ); ?>
52 </a>
53 <a href="<?php echo esc_url( get_permalink( $entry->post_id ) ); ?>">
54 <?php esc_html_e( 'View', 'formidable' ); ?>
55 </a>
56 </span>
57 </div>
58 <?php } ?>
59
60 <div class="misc-pub-section">
61 <?php FrmAppHelper::icon_by_class( 'frmfont frm_fingerprint_icon', array( 'aria-hidden' => 'true' ) ); ?>
62 <?php esc_html_e( 'Entry ID', 'formidable' ); ?>:
63 <b><?php echo absint( $entry->id ); ?></b>
64 </div>
65
66 <div class="misc-pub-section">
67 <?php FrmAppHelper::icon_by_class( 'frmfont frm_key_icon', array( 'aria-hidden' => 'true' ) ); ?>
68 <?php esc_html_e( 'Entry Key', 'formidable' ); ?>:
69 <b><?php echo esc_html( $entry->item_key ); ?></b>
70 </div>
71
72 <?php if ( $entry->parent_item_id ) { ?>
73 <div class="misc-pub-section">
74 <?php FrmAppHelper::icon_by_class( 'frmfont frm_sitemap_icon', array( 'aria-hidden' => 'true' ) ); ?>
75 <?php esc_html_e( 'Parent Entry ID', 'formidable' ); ?>:
76 <b><?php echo esc_html( $entry->parent_item_id ); ?></b>
77 </div>
78 <?php } ?>
79
80 <?php FrmEntriesHelper::maybe_render_captcha_score( $entry->id ); ?>
81 </div>
82 </div>
83
84 <?php do_action( 'frm_entry_shared_sidebar_middle', $entry ); ?>
85
86 <div class="frm_with_icons">
87 <h3><?php esc_html_e( 'User Information', 'formidable' ); ?></h3>
88 <div class="inside">
89 <?php if ( $entry->user_id ) { ?>
90 <div class="misc-pub-section">
91 <?php
92 FrmAppHelper::icon_by_class( 'frmfont frm_user_icon', array( 'aria-hidden' => 'true' ) );
93
94 printf(
95 /* translators: %1$s: User display name. */
96 esc_html__( 'Created by: %1$s', 'formidable' ),
97 FrmAppHelper::kses( FrmFieldsHelper::get_user_display_name( $entry->user_id, 'display_name', array( 'link' => true ) ), array( 'a' ) ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
98 );
99 ?>
100 </div>
101 <?php } ?>
102
103 <?php // phpcs:ignore Universal.Operators.StrictComparisons ?>
104 <?php if ( $entry->updated_by && $entry->updated_by != $entry->user_id ) { ?>
105 <div class="misc-pub-section">
106 <?php
107 FrmAppHelper::icon_by_class( 'frmfont frm_user_icon', array( 'aria-hidden' => 'true' ) );
108
109 printf(
110 /* translators: %1$s: User display name. */
111 esc_html__( 'Updated by: %1$s', 'formidable' ),
112 FrmAppHelper::kses( FrmFieldsHelper::get_user_display_name( $entry->updated_by, 'display_name', array( 'link' => true ) ), array( 'a' ) ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
113 );
114 ?>
115 </div>
116 <?php } ?>
117
118 <?php if ( ! empty( $entry->ip ) ) { ?>
119 <div class="misc-pub-section">
120 <?php FrmAppHelper::icon_by_class( 'frmfont frm_location_icon', array( 'aria-hidden' => 'true' ) ); ?>
121 <?php esc_html_e( 'IP Address:', 'formidable' ); ?>
122 <b><?php echo esc_html( $entry->ip ); ?></b>
123 </div>
124 <?php } ?>
125
126 <?php if ( isset( $browser ) ) { ?>
127 <div class="misc-pub-section">
128 <?php FrmAppHelper::icon_by_class( 'frmfont frm_browser_icon', array( 'aria-hidden' => 'true' ) ); ?>
129 <?php esc_html_e( 'Browser/OS:', 'formidable' ); ?>
130 <b><?php echo wp_kses_post( $browser ); ?></b>
131 </div>
132 <?php } ?>
133
134 <?php if ( isset( $data['referrer'] ) ) { ?>
135 <div class="misc-pub-section frm_force_wrap">
136 <?php FrmAppHelper::icon_by_class( 'frmfont frm_history_icon', array( 'aria-hidden' => 'true' ) ); ?>
137 <?php esc_html_e( 'Referrer:', 'formidable' ); ?>
138 <?php echo wp_kses_post( str_replace( "\r\n", '<br/>', $data['referrer'] ) ); ?>
139 </div>
140 <?php } ?>
141
142 <?php
143 foreach ( (array) $data as $k => $d ) {
144 if ( in_array( $k, array( 'browser', 'referrer', 'user_journey' ), true ) ) {
145 continue;
146 }
147 ?>
148 <div class="misc-pub-section">
149 <?php FrmAppHelper::icon_by_class( 'frmfont frm_attach_file_icon', array( 'aria-hidden' => 'true' ) ); ?>
150 <?php echo esc_html( ucfirst( str_replace( '-', ' ', $k ) ) ); ?>:
151 <b><?php echo wp_kses_post( implode( ', ', (array) $d ) ); ?></b>
152 </div>
153 <?php
154 unset( $k, $d );
155 }
156 ?>
157 </div>
158 </div>
159