aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-03-12 14:39:06 +0100
committerArthurHoaro <arthur@hoa.ro>2016-03-18 19:13:48 +0100
commitbcd078bf0a5119fe0c8441b803b4fe05fdaa6d18 (patch)
treee2dae6aa50d4a069438c1cd0b0ae7b1bd2c0bd2b /index.php
parente67712ba0f8896f0d7e676292f557b5999c2848d (diff)
downloadShaarli-bcd078bf0a5119fe0c8441b803b4fe05fdaa6d18.tar.gz
Shaarli-bcd078bf0a5119fe0c8441b803b4fe05fdaa6d18.tar.zst
Shaarli-bcd078bf0a5119fe0c8441b803b4fe05fdaa6d18.zip
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.
Diffstat (limited to 'index.php')
-rw-r--r--index.php6
1 files changed, 6 insertions, 0 deletions
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)
785 $data['usepermalinks'] = $usepermalinks; 785 $data['usepermalinks'] = $usepermalinks;
786 $data['links'] = $linkDisp; 786 $data['links'] = $linkDisp;
787 787
788 $pluginManager = PluginManager::getInstance();
789 $pluginManager->executeHooks('render_feed', $data, array(
790 'loggedin' => isLoggedIn(),
791 'target' => Router::$PAGE_RSS,
792 ));
793
788 $pageBuilder->assignAll($data); 794 $pageBuilder->assignAll($data);
789 $pageBuilder->renderPage('feed.rss', false); 795 $pageBuilder->renderPage('feed.rss', false);
790 $cache->cache(ob_get_contents()); 796 $cache->cache(ob_get_contents());