From c49bc37f8388de0734c6009f1d2f2f476bd9bf41 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 26 Nov 2022 18:54:32 +0300 Subject: pass article link in hook_article_image --- init.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/init.php b/init.php index bec0b59..7b291db 100644 --- a/init.php +++ b/init.php @@ -399,7 +399,13 @@ class Api_Resize_Media extends Plugin { function hook_article_image($enclosures, $content, $site_url, $article) { $width = (int) clean($_REQUEST["resize_width"] ?? 0); - $article = $this->process_article(["headline" => ["content" => $content]], $width); + $article = $this->process_article([ + "headline" => + [ + "content" => $content, + "link" => $article['link'] + ] + ], $width); return ["", "", $article["content"]]; } -- cgit v1.2.3