summaryrefslogtreecommitdiff
path: root/feed.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2007-07-18 14:20:11 +0200
committerAndreas Gohr <andi@splitbrain.org>2007-07-18 14:20:11 +0200
commit883480fb56dd62f69b606966a0a46b77c50142e3 (patch)
treef170ee3d30940251a6db896397dfe0c9f304fc95 /feed.php
parentfd661b4860e5b7a7ba5ea03204484400ea06acf5 (diff)
downloadrpg-883480fb56dd62f69b606966a0a46b77c50142e3.tar.gz
rpg-883480fb56dd62f69b606966a0a46b77c50142e3.tar.bz2
Action plugin hook for manipulating feed items
darcs-hash:20070718122011-7ad00-5c9ae37801b80ff2e42929ae9729f625c447c405.gz
Diffstat (limited to 'feed.php')
-rw-r--r--feed.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/feed.php b/feed.php
index ce8b26e28..cf1b7a64c 100644
--- a/feed.php
+++ b/feed.php
@@ -134,6 +134,7 @@ function rss_buildItems(&$rss,&$data,$opt){
global $conf;
global $lang;
+
foreach($data as $ditem){
if(!is_array($ditem)){
// not an array? then only a list of IDs was given
@@ -257,8 +258,16 @@ function rss_buildItems(&$rss,&$data,$opt){
if($cat) $item->category = $cat;
}
- // finally add the item to the feed object
- $rss->addItem($item);
+ // finally add the item to the feed object, after handing it to registered plugins
+ $evdata = array('item' => &$item,
+ 'opt' => &$opt,
+ 'ditem' => &$ditem,
+ 'rss' => &$rss);
+ $evt = new Doku_Event('RSS_ITEM', $evdata);
+ if ($evt->advise_before()){
+ $rss->addItem($item);
+ }
+ $evt->advise_after(); // for completeness
}
}