Skip to content

Commit

Permalink
Use printf() where possible.
Browse files Browse the repository at this point in the history
  • Loading branch information
boonebgorges committed Sep 14, 2023
1 parent da3e381 commit 2caf5c9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Core/Admin/PFTemplater.php
Original file line number Diff line number Diff line change
Expand Up @@ -748,8 +748,12 @@ public function form_of_an_item( $item, $c, $format = 'standard', $metadata = ar
// translators: 1. Publication date; 2. Link to item author.
echo '<div class="item_meta item_meta_date">' . sprintf( esc_html__( 'Published on %1$s by %2$s.', 'pressforward' ), esc_html( $item['item_date'] ), '<span class="item-authorship">' . esc_html( $item['item_author'] ) . '</span>' ) . '</div>';

// translators: 1. Unix timestamp for item date; 2. Unix timestamp for date added to feed.
echo sprintf( esc_html__( 'Unix timestamp for item date: %1$s. Unix timestamp for date added to feed: %2$s', 'pressforward' ), '<span class="sortableitemdate">' . esc_html( strtotime( $item['item_date'] ) ) . '</span>', '<span class="sortablerssdate">' . esc_html( strtotime( $item['item_added_date'] ) ) . '</span>.' );
printf(
// translators: 1. Unix timestamp for item date; 2. Unix timestamp for date added to feed.
esc_html__( 'Unix timestamp for item date: %1$s. Unix timestamp for date added to feed: %2$s', 'pressforward' ),
'<span class="sortableitemdate">' . esc_html( strtotime( $item['item_date'] ) ) . '</span>',
'<span class="sortablerssdate">' . esc_html( strtotime( $item['item_added_date'] ) ) . '</span>.'
);
?>
</div>
<?php
Expand Down

0 comments on commit 2caf5c9

Please sign in to comment.