Skip to content

Commit 0c6ac6f

Browse files
committed
made all options possible callbacks
Signed-off-by: Bruno Meilick <[email protected]>
1 parent 4b64a29 commit 0c6ac6f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

classes/Feed.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ public function optionsFromDefault(?Pages $pages = null, $options = []): array
124124
];
125125
$options = array_merge($defaults, $options);
126126

127+
foreach ($options as $key => $call) {
128+
if (is_callable($call)) {
129+
$options[$key] = $call();
130+
}
131+
}
132+
127133
$items = $pages ?? null;
128134
if ($items && $options['sort'] === true) {
129135
$items = $items->sortBy($options['datefield'], 'desc');

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bnomei/kirby3-feed",
33
"type": "kirby-plugin",
4-
"version": "1.3.1",
4+
"version": "1.3.2",
55
"description": "Generate a RSS/JSON-Feed from a Pages-Collection",
66
"license": "MIT",
77
"authors": [

0 commit comments

Comments
 (0)