Add human filter
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
afed5c752f
commit
1312a2d6f5
12
Plugin.php
12
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() {
|
public function registerSettings() {
|
||||||
return [
|
return [
|
||||||
'settings' => [
|
'settings' => [
|
||||||
|
|
Loading…
Reference in New Issue