Skip to content

Commit

Permalink
fix: Setting _formatted appendix to formatted dates in the post hel…
Browse files Browse the repository at this point in the history
…per, so that standard timestamps aren't lost from the post object in the complementObject() method
  • Loading branch information
annalinneajohansson committed Nov 20, 2023
1 parent e1ef5f4 commit 892a3e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/Helper/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@ public static function complementObject($postObject, $appendFields = [], $data =
}

//Set time formats
$postObject->post_time = wp_date(
$postObject->post_time_formatted = wp_date(
\Municipio\Helper\DateFormat::getDateFormat('time'), strtotime($postObject->post_date)
);
$postObject->post_date_time = wp_date(
$postObject->post_date_time_formatted = wp_date(
\Municipio\Helper\DateFormat::getDateFormat('date-time'), strtotime($postObject->post_date)
);
$postObject->post_date = wp_date(
$postObject->post_date_formatted = wp_date(
\Municipio\Helper\DateFormat::getDateFormat('date'), strtotime($postObject->post_date)
);

Expand Down

0 comments on commit 892a3e2

Please sign in to comment.