| @@ -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 | |
| @@ -8,22 +17,15 @@ | ||
| 8 | 17 | } |
| 9 | 18 | ?> |
| 10 | 19 | |
| 11 | 20 | <div class="misc-pub-section"> |
| 12 | - <?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' ) ); ?> | |
| 13 | 22 | <span id="timestamp"> |
| 14 | 23 | <?php |
| 15 | 24 | |
| 16 | 25 | $date_format = get_option( 'date_format' ); |
| 26 | + $date_format = $date_format ? str_replace( 'F', 'M', $date_format ) : __( 'M j, Y', 'formidable' ); | |
| 17 | 27 | |
| 18 | - if ( $date_format ) { | |
| 19 | - // Use short months since the sidebar space is limited. | |
| 20 | - $date_format = str_replace( 'F', 'M', $date_format ); | |
| 21 | - } else { | |
| 22 | - // Fallback if there is no option in the database. | |
| 23 | - $date_format = __( 'M j, Y', 'formidable' ); | |
| 24 | - } | |
| 25 | - | |
| 26 | 28 | /** |
| 27 | 29 | * @since 6.25 |
| 28 | 30 | * |
| 29 | 31 | * @param string $text |
| @@ -28,8 +30,9 @@ | ||
| 28 | 30 | * |
| 29 | 31 | * @param string $text |
| 30 | 32 | * @param stdClass $entry |
| 31 | 33 | */ |
| 34 | + // skipcq: PHP-W1020 | |
| 32 | 35 | $additional_timestamp_text = apply_filters( 'frm_additional_timestamp_text', '', $entry ); |
| 33 | 36 | |
| 34 | 37 | printf( |
| 35 | 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 */ |
| @@ -43,11 +46,12 @@ | ||
| 43 | 46 | ?> |
| 44 | 47 | </span> |
| 45 | 48 | </div> |
| 46 | 49 | |
| 50 | +<?php // phpcs:ignore Universal.Operators.StrictComparisons ?> | |
| 47 | 51 | <?php if ( $entry->updated_at && $entry->updated_at != $entry->created_at ) { ?> |
| 48 | 52 | <div class="misc-pub-section"> |
| 49 | - <?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' ) ); ?> | |
| 50 | 54 | <span id="timestamp"> |
| 51 | 55 | <?php |
| 52 | 56 | printf( |
| 53 | 57 | /* translators: %1$s: The date */ |