forked from sylvainjule/kirby-footnotes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
42 lines (38 loc) · 1.43 KB
/
index.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
35
36
37
38
39
40
41
42
<?php
require_once __DIR__ . '/lib/footnotes.php';
Kirby::plugin('sylvainjule/footnotes', [
'options' => array(
'wrapper' => 'div',
'back' => '↩',
'links' => true,
),
'fieldMethods' => [
'footnotes' => function($field) {
return Footnotes::convert($field->text());
},
'ft' => function($field) {
return $field->footnotes();
},
'removeFootnotes' => function($field) {
return Footnotes::convert($field->text(), true);
},
'withoutFootnotes' => function($field) {
return Footnotes::convert($field->text(), false, true);
},
'onlyFootnotes' => function($field) {
return Footnotes::convert($field->text(), false, false, true);
},
/* Temporary solution, waiting for Blocks methods */
'withoutBlocksFootnotes' => function($field, $startAt) {
return Footnotes::convert($field->text(), false, true, false, false, $startAt);
},
'onlyBlocksFootnotes' => function($field, $startAt) {
return Footnotes::convert($field->text(), false, false, true, false, $startAt, true);
}
],
'snippets' => [
'footnotes_container' => __DIR__ . '/snippets/container.php',
'footnotes_entry' => __DIR__ . '/snippets/entry.php',
'footnotes_reference' => __DIR__ . '/snippets/reference.php'
]
]);