api: pass hook object payload by reference
This commit is contained in:
parent
3655e7aaf1
commit
6a25bc53ef
|
@ -352,7 +352,7 @@ class API extends Handler {
|
||||||
$article["content"] = $line["content"];
|
$article["content"] = $line["content"];
|
||||||
}
|
}
|
||||||
|
|
||||||
$hook_object = ["article" => $article];
|
$hook_object = ["article" => &$article];
|
||||||
|
|
||||||
PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_RENDER_ARTICLE_API,
|
PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_RENDER_ARTICLE_API,
|
||||||
function ($result) use (&$article) {
|
function ($result) use (&$article) {
|
||||||
|
@ -785,7 +785,7 @@ class API extends Handler {
|
||||||
$headline_row["note"] = $line["note"];
|
$headline_row["note"] = $line["note"];
|
||||||
$headline_row["lang"] = $line["lang"];
|
$headline_row["lang"] = $line["lang"];
|
||||||
|
|
||||||
$hook_object = ["headline" => $headline_row];
|
$hook_object = ["headline" => &$headline_row];
|
||||||
|
|
||||||
PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_RENDER_ARTICLE_API,
|
PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_RENDER_ARTICLE_API,
|
||||||
function ($result) use (&$headline_row) {
|
function ($result) use (&$headline_row) {
|
||||||
|
|
Loading…
Reference in New Issue