]> git.wh0rd.org - tt-rss.git/blob - plugins/example_article/init.php
05f95a40a0e40fdb9c60ead34b6089becdf43dbb
[tt-rss.git] / plugins / example_article / init.php
1 <?php
2 class Example_Article extends Plugin {
3
4 private $link;
5 private $host;
6
7 function about() {
8 return array(1.0,
9 "Example plugin for HOOK_RENDER_ARTICLE",
10 "fox",
11 true);
12 }
13
14 function init($host) {
15 $this->link = $host->get_link();
16 $this->host = $host;
17
18 $host->add_hook($host::HOOK_RENDER_ARTICLE, $this);
19 }
20
21 function get_prefs_js() {
22 return file_get_contents(dirname(__FILE__) . "/init.js");
23 }
24
25 function hook_render_article($article) {
26 $article["content"] = "Content changed: " . $article["content"];
27
28 return $article;
29 }
30 }
31 ?>