-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextend.php
34 lines (26 loc) · 1.04 KB
/
extend.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
namespace ClarkWinkelmann\ProminentPostNumbers;
use Flarum\Extend;
use Flarum\Locale\Translator;
return [
(new Extend\Frontend('admin'))
->js(__DIR__ . '/js/dist/admin.js'),
(new Extend\Frontend('forum'))
->js(__DIR__ . '/js/dist/forum.js')
->css(__DIR__ . '/less/forum.less'),
new Extend\Locales(__DIR__ . '/locale'),
(new Extend\Settings())
->registerLessConfigVar('config-prominent-post-numbers-floating', 'prominentPostNumberFloating', function ($value) {
return $value ? 'true' : 'false';
})
->default('prominentPostNumberPrefix', '#')
->serializeToForum('prominentPostNumberFormat', 'prominentPostNumberPrefix', function ($prefix) {
if (!$prefix) {
return resolve(Translator::class)->trans('clarkwinkelmann-prominent-post-numbers.views.format');
}
return $prefix . '{number}';
}),
(new Extend\Formatter())
->configure(ConfigureMentions::class)
->render(FormatPostMentions::class),
];