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
← All changes | classes/views/frm-entries/_sidebar-shared-pub.php +34 -8 6.5.3 → trunk View file →
@@ -1,5 +1,14 @@
1 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 +
2 11 if ( ! defined( 'ABSPATH' ) ) {
3 12 die( 'You are not allowed to call this page directly.' );
4 13 }
5 14
@@ -4,34 +13,51 @@
4 13 }
5 14
6 15 if ( ! isset( $entry ) ) {
7 16 $entry = $record;
8 -} ?>
17 +}
18 +?>
9 19
10 20 <div class="misc-pub-section">
11 - <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_calendar_icon', array( 'aria-hidden' => 'true' ) ); ?>
21 + <?php FrmAppHelper::icon_by_class( 'frmfont frm_calendar_icon', array( 'aria-hidden' => 'true' ) ); ?>
12 22 <span id="timestamp">
13 23 <?php
14 - $date_format = __( 'M j, Y @ G:i', 'formidable' );
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 +
15 37 printf(
16 - /* translators: %1$s: Entry status %2$s: The date */
17 - esc_html__( '%1$s: %2$s', 'formidable' ),
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' ),
18 40 esc_html( FrmEntriesHelper::get_entry_status_label( $entry->is_draft ) ),
19 - '<b>' . esc_html( FrmAppHelper::get_localized_date( $date_format, $entry->created_at ) ) . '</b>'
41 + '<b>',
42 + esc_html( FrmAppHelper::get_formatted_time( $entry->created_at, $date_format ) ),
43 + esc_html( $additional_timestamp_text ),
44 + '</b>'
20 45 );
21 46 ?>
22 47 </span>
23 48 </div>
24 49
50 +<?php // phpcs:ignore Universal.Operators.StrictComparisons ?>
25 51 <?php if ( $entry->updated_at && $entry->updated_at != $entry->created_at ) { ?>
26 52 <div class="misc-pub-section">
27 - <?php FrmAppHelper::icon_by_class( 'frm_icon_font frm_calendar_icon', array( 'aria-hidden' => 'true' ) ); ?>
53 + <?php FrmAppHelper::icon_by_class( 'frmfont frm_calendar_icon', array( 'aria-hidden' => 'true' ) ); ?>
28 54 <span id="timestamp">
29 55 <?php
30 56 printf(
31 57 /* translators: %1$s: The date */
32 58 esc_html__( 'Updated: %1$s', 'formidable' ),
33 - '<b>' . esc_html( FrmAppHelper::get_localized_date( $date_format, $entry->updated_at ) ) . '</b>'
59 + '<b>' . esc_html( FrmAppHelper::get_formatted_time( $entry->updated_at, $date_format ) ) . '</b>'
34 60 );
35 61 ?>
36 62 </span>
37 63 </div>