Skip to content
Snippets Groups Projects
Commit 72c04123 authored by Andrew Dolgov's avatar Andrew Dolgov
Browse files

HOOK_ARTICLE_IMAGE: stop after first provided match

parent 518e677a
No related branches found
No related tags found
No related merge requests found
......@@ -550,8 +550,11 @@ class Article extends Handler_Protected {
$article_kind = 0;
PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_ARTICLE_IMAGE,
function ($result) use (&$article_image, &$article_stream, &$content) {
function ($result, $plugin) use (&$article_image, &$article_stream, &$content) {
list ($article_image, $article_stream, $content) = $result;
// run until first hard match
return !empty($article_image);
},
$enclosures, $content, $site_url, $headline);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment