From b63c6c89916257d3cf9ed40c52423b7b73e43a80 Mon Sep 17 00:00:00 2001 From: mricoul Date: Fri, 14 Aug 2026 14:27:52 +0200 Subject: [PATCH 1/2] feat(Datetime): add Datetime helper --- functions.php | 1 + inc/Helpers/Formatting/Datetime.php | 86 +++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 inc/Helpers/Formatting/Datetime.php diff --git a/functions.php b/functions.php index 623b7b9c..a87370d4 100644 --- a/functions.php +++ b/functions.php @@ -27,6 +27,7 @@ function () { } ); require_once __DIR__ . '/inc/Helpers/Svg.php'; +require_once __DIR__ . '/inc/Helpers/Formatting/Datetime.php'; require_once __DIR__ . '/inc/Helpers/Formatting/Escape.php'; require_once __DIR__ . '/inc/Helpers/Formatting/Image.php'; require_once __DIR__ . '/inc/Helpers/Formatting/Link.php'; diff --git a/inc/Helpers/Formatting/Datetime.php b/inc/Helpers/Formatting/Datetime.php new file mode 100644 index 00000000..40d30616 --- /dev/null +++ b/inc/Helpers/Formatting/Datetime.php @@ -0,0 +1,86 @@ + markup. + * + * @usage BEA\Theme\Framework\Helpers\Formatting\Datetime\the_datetime( get_the_date( 'd.m.Y' ), [ 'datetime' => get_the_date( 'Y-m-d' ), 'class' => 'crd__date' ] ); + * + * @param string $display_date Formatted date string shown to users. + * @param array $settings { + * Optional. Settings for the datetime markup. + * + * @type string $before Markup before the