From e0ef3cc4f1837c4d98dccd10dfe51a1ed9c41963 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 7 May 2019 08:09:07 +0300 Subject: initial --- init.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 init.php (limited to 'init.php') diff --git a/init.php b/init.php new file mode 100644 index 0000000..d6772f6 --- /dev/null +++ b/init.php @@ -0,0 +1,28 @@ +host = $host; + + $host->add_hook($host::HOOK_RENDER_ARTICLE_API, $this); + } + + function hook_render_article_api($row) { + $article = isset($row['headline']) ? $row['headline'] : $row['article']; + + $article['content'] = "
" . $article['content'] . "
"; + + return $article; + } + + function api_version() { + return 2; + } +} -- cgit v1.2.3