]>
Commit | Line | Data |
---|---|---|
32c399b1 AD |
1 | <?php |
2 | class Example_Article extends Plugin { | |
3 | ||
32c399b1 AD |
4 | private $host; |
5 | ||
6 | function about() { | |
7 | return array(1.0, | |
8 | "Example plugin for HOOK_RENDER_ARTICLE", | |
9 | "fox", | |
10 | true); | |
11 | } | |
12 | ||
13 | function init($host) { | |
32c399b1 AD |
14 | $this->host = $host; |
15 | ||
16 | $host->add_hook($host::HOOK_RENDER_ARTICLE, $this); | |
17 | } | |
18 | ||
19 | function get_prefs_js() { | |
20 | return file_get_contents(dirname(__FILE__) . "/init.js"); | |
21 | } | |
22 | ||
23 | function hook_render_article($article) { | |
24 | $article["content"] = "Content changed: " . $article["content"]; | |
25 | ||
26 | return $article; | |
27 | } | |
28 | } | |
29 | ?> |