| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
die( 'You are not allowed to call this page directly.' ); |
| 4 |
} |
| 5 |
|
| 6 |
if ( ! isset( $entry ) ) { |
| 7 |
$entry = $record; |
| 8 |
} |
| 9 |
?> |
| 10 |
|
| 11 |
<div class="misc-pub-section"> |
| 12 |
<?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_calendar_icon', array( 'aria-hidden' => 'true' ) ); ?> |
| 13 |
<span id="timestamp"> |
| 14 |
<?php |
| 15 |
|
| 16 |
$date_format = get_option( 'date_format' ); |
| 17 |
if ( $date_format ) { |
| 18 |
// Use short months since the sidebar space is limited. |
| 19 |
$date_format = str_replace( 'F', 'M', $date_format ); |
| 20 |
} else { |
| 21 |
// Fallback if there is no option in the database. |
| 22 |
$date_format = __( 'M j, Y', 'formidable' ); |
| 23 |
} |
| 24 |
|
| 25 |
/** |
| 26 |
* @since 6.25 |
| 27 |
* |
| 28 |
* @param string $text |
| 29 |
* @param stdClass $entry |
| 30 |
*/ |
| 31 |
$additional_timestamp_text = apply_filters( 'frm_additional_timestamp_text', '', $entry ); |
| 32 |
|
| 33 |
printf( |
| 34 |
/* translators: %1$s: Entry status, %2$s: <b> open tag, %3$s: The date, %4$s: Possible additional text, %5$s: </b> close tag */ |
| 35 |
esc_html__( '%1$s: %2$s%3$s%4$s%5$s', 'formidable' ), |
| 36 |
esc_html( FrmEntriesHelper::get_entry_status_label( $entry->is_draft ) ), |
| 37 |
'<b>', |
| 38 |
esc_html( FrmAppHelper::get_formatted_time( $entry->created_at, $date_format ) ), |
| 39 |
esc_html( $additional_timestamp_text ), |
| 40 |
'</b>' |
| 41 |
); |
| 42 |
?> |
| 43 |
</span> |
| 44 |
</div> |
| 45 |
|
| 46 |
<?php if ( $entry->updated_at && $entry->updated_at != $entry->created_at ) { ?> |
| 47 |
<div class="misc-pub-section"> |
| 48 |
<?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_calendar_icon', array( 'aria-hidden' => 'true' ) ); ?> |
| 49 |
<span id="timestamp"> |
| 50 |
<?php |
| 51 |
printf( |
| 52 |
/* translators: %1$s: The date */ |
| 53 |
esc_html__( 'Updated: %1$s', 'formidable' ), |
| 54 |
'<b>' . esc_html( FrmAppHelper::get_formatted_time( $entry->updated_at, $date_format ) ) . '</b>' |
| 55 |
); |
| 56 |
?> |
| 57 |
</span> |
| 58 |
</div> |
| 59 |
<?php } ?> |
| 60 |
|
| 61 |
<?php do_action( 'frm_entry_shared_sidebar', $entry ); ?> |
| 62 |
|