summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2022-11-26 18:54:32 +0300
committerAndrew Dolgov <[email protected]>2022-11-26 18:54:32 +0300
commitc49bc37f8388de0734c6009f1d2f2f476bd9bf41 (patch)
tree4e154d63c5bac919aa1037c6da58ffbf607491ef
parentacd791793ffea56678deb3841b324c9207c3601d (diff)
pass article link in hook_article_image
-rw-r--r--init.php8
1 files changed, 7 insertions, 1 deletions
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"]];
}