diff options
author | Andrew Dolgov <[email protected]> | 2013-04-02 23:02:52 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-04-02 23:02:52 +0400 |
commit | 0db61af84176a39cf1dfd90f62985d0728822b03 (patch) | |
tree | 65c7c3d9bc5c49191803ffc648457144b36f957e /classes | |
parent | e3c394d391bace0370bb630c492051a790ca22e8 (diff) |
api: add article api hook to getArticle, change parameters passed
Diffstat (limited to 'classes')
-rw-r--r-- | classes/api.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/classes/api.php b/classes/api.php index 902cb0853..4427834eb 100644 --- a/classes/api.php +++ b/classes/api.php @@ -340,6 +340,12 @@ class API extends Handler { "attachments" => $attachments ); + global $pluginhost; + foreach ($pluginhost->get_hooks($pluginhost::HOOK_RENDER_ARTICLE_API) as $p) { + $article = $p->hook_render_article_api(array("article" => $article)); + } + + array_push($articles, $article); } @@ -680,7 +686,7 @@ class API extends Handler { global $pluginhost; foreach ($pluginhost->get_hooks($pluginhost::HOOK_RENDER_ARTICLE_API) as $p) { - $headline_row = $p->hook_render_article_api($headline_row); + $headline_row = $p->hook_render_article_api(array("headline" => $headline_row)); } array_push($headlines, $headline_row); |