From bcd078bf0a5119fe0c8441b803b4fe05fdaa6d18 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 12 Mar 2016 14:39:06 +0100 Subject: Plugin: add render_feed hook and call it while generating ATOM and RSS feed. Create an example of the new hook in the demo plugin. --- index.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index 261c8a37..73b83533 100644 --- a/index.php +++ b/index.php @@ -785,6 +785,12 @@ function showRSS($pageBuilder, $linkDB) $data['usepermalinks'] = $usepermalinks; $data['links'] = $linkDisp; + $pluginManager = PluginManager::getInstance(); + $pluginManager->executeHooks('render_feed', $data, array( + 'loggedin' => isLoggedIn(), + 'target' => Router::$PAGE_RSS, + )); + $pageBuilder->assignAll($data); $pageBuilder->renderPage('feed.rss', false); $cache->cache(ob_get_contents()); -- cgit v1.2.3