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-pub.php

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

67 lines 1.9 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 publish box.
4 *
5 * @package Formidable
6 *
7 * @var stdClass|null $entry Entry object (falls back to $record).
8 * @var stdClass|null $record Legacy entry object used when $entry is not set.
9 */
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 die( 'You are not allowed to call this page directly.' );
13 }
14
15 if ( ! isset( $entry ) ) {
16 $entry = $record;
17 }
18 ?>
19
20 <div class="misc-pub-section">
21 <?php FrmAppHelper::icon_by_class( 'frmfont frm_calendar_icon', array( 'aria-hidden' => 'true' ) ); ?>
22 <span id="timestamp">
23 <?php
24
25 $date_format = get_option( 'date_format' );
26 $date_format = $date_format ? str_replace( 'F', 'M', $date_format ) : __( 'M j, Y', 'formidable' );
27
28 /**
29 * @since 6.25
30 *
31 * @param string $text
32 * @param stdClass $entry
33 */
34 // skipcq: PHP-W1020
35 $additional_timestamp_text = apply_filters( 'frm_additional_timestamp_text', '', $entry );
36
37 printf(
38 /* translators: %1$s: Entry status, %2$s: <b> open tag, %3$s: The date, %4$s: Possible additional text, %5$s: </b> close tag */
39 esc_html__( '%1$s: %2$s%3$s%4$s%5$s', 'formidable' ),
40 esc_html( FrmEntriesHelper::get_entry_status_label( $entry->is_draft ) ),
41 '<b>',
42 esc_html( FrmAppHelper::get_formatted_time( $entry->created_at, $date_format ) ),
43 esc_html( $additional_timestamp_text ),
44 '</b>'
45 );
46 ?>
47 </span>
48 </div>
49
50 <?php // phpcs:ignore Universal.Operators.StrictComparisons ?>
51 <?php if ( $entry->updated_at && $entry->updated_at != $entry->created_at ) { ?>
52 <div class="misc-pub-section">
53 <?php FrmAppHelper::icon_by_class( 'frmfont frm_calendar_icon', array( 'aria-hidden' => 'true' ) ); ?>
54 <span id="timestamp">
55 <?php
56 printf(
57 /* translators: %1$s: The date */
58 esc_html__( 'Updated: %1$s', 'formidable' ),
59 '<b>' . esc_html( FrmAppHelper::get_formatted_time( $entry->updated_at, $date_format ) ) . '</b>'
60 );
61 ?>
62 </span>
63 </div>
64 <?php } ?>
65
66 <?php do_action( 'frm_entry_shared_sidebar', $entry ); ?>
67