diff --git a/functions.php b/functions.php index 1793228..1497288 100644 --- a/functions.php +++ b/functions.php @@ -24,6 +24,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 0000000..bd8cb4a --- /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