aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2024-02-09 11:40:21 +0100
committerGitHub <noreply@github.com>2024-02-09 11:40:21 +0100
commitd602927bd9847b12f5f45e64b3defe852999009e (patch)
tree6021c5bdfe79b95f1903fcc5ce7d0913d30a0b35
parent9e3e140bb0697fe0d33503a61a795abf9d237c98 (diff)
parent64e1c19b92bde812ff33823852c8774c7892500f (diff)
downloaddokuwiki-d602927bd9847b12f5f45e64b3defe852999009e.tar.gz
dokuwiki-d602927bd9847b12f5f45e64b3defe852999009e.zip
Merge pull request #4195 from gerardnico/patch-1
Reintroduce the FEED_DATA_PROCESS event
-rw-r--r--inc/Feed/FeedCreator.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/inc/Feed/FeedCreator.php b/inc/Feed/FeedCreator.php
index 739a8bd12..d17f125c6 100644
--- a/inc/Feed/FeedCreator.php
+++ b/inc/Feed/FeedCreator.php
@@ -50,9 +50,18 @@ class FeedCreator
$items = $this->fetchItemsFromPlugin();
}
- foreach ($items as $item) {
- $this->createAndAddItem($item);
+ $eventData = [
+ 'rss' => $this->feed,
+ 'data' => &$items,
+ 'opt' => &$this->options->options,
+ ];
+ $event = new Event('FEED_DATA_PROCESS', $eventData);
+ if ($event->advise_before(false)) {
+ foreach ($items as $item) {
+ $this->createAndAddItem($item);
+ }
}
+ $event->advise_after();
return $this->feed->createFeed($this->options->get('type'));
}