diff options
author | Andreas Gohr <andi@splitbrain.org> | 2007-07-18 14:20:11 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2007-07-18 14:20:11 +0200 |
commit | 883480fb56dd62f69b606966a0a46b77c50142e3 (patch) | |
tree | f170ee3d30940251a6db896397dfe0c9f304fc95 | |
parent | fd661b4860e5b7a7ba5ea03204484400ea06acf5 (diff) | |
download | rpg-883480fb56dd62f69b606966a0a46b77c50142e3.tar.gz rpg-883480fb56dd62f69b606966a0a46b77c50142e3.tar.bz2 |
Action plugin hook for manipulating feed items
darcs-hash:20070718122011-7ad00-5c9ae37801b80ff2e42929ae9729f625c447c405.gz
-rw-r--r-- | feed.php | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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 } } |