From 1312a2d6f5f47fca67582d7f6789a135ddf29b63 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Fri, 17 Dec 2021 00:28:55 +0100 Subject: [PATCH] Add human filter --- Plugin.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Plugin.php b/Plugin.php index 8887f53..18ec222 100644 --- a/Plugin.php +++ b/Plugin.php @@ -96,6 +96,18 @@ class Plugin extends PluginBase ]; } + public function registerMarkupTags(): array + { + return [ + 'filters' => [ + 'human' => function($date) { + return $date->diffForHumans(); + } + ] + ]; + + } + public function registerSettings() { return [ 'settings' => [