From: Andrew Dolgov Date: Sat, 23 Feb 2013 12:02:04 +0000 (+0400) Subject: add example article hook plugin X-Git-Tag: 1.7.1~56 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=32c399b1bfdb1446a0ee9a78ad746f078b3d5605;p=tt-rss.git add example article hook plugin --- diff --git a/plugins/example_article/init.js b/plugins/example_article/init.js new file mode 100644 index 00000000..e69de29b diff --git a/plugins/example_article/init.php b/plugins/example_article/init.php new file mode 100644 index 00000000..05f95a40 --- /dev/null +++ b/plugins/example_article/init.php @@ -0,0 +1,31 @@ +link = $host->get_link(); + $this->host = $host; + + $host->add_hook($host::HOOK_RENDER_ARTICLE, $this); + } + + function get_prefs_js() { + return file_get_contents(dirname(__FILE__) . "/init.js"); + } + + function hook_render_article($article) { + $article["content"] = "Content changed: " . $article["content"]; + + return $article; + } +} +?>