mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-10 00:48:48 +00:00
[AssociatedPressNews] fix: prepend lead photo to items (#2905)
This commit is contained in:
parent
f672902896
commit
c992bcc8bf
@ -149,8 +149,11 @@ class AssociatedPressNewsBridge extends BridgeAbstract
|
|||||||
$this->processIframes($html);
|
$this->processIframes($html);
|
||||||
|
|
||||||
if (!is_null($storyContent['leadPhotoId'])) {
|
if (!is_null($storyContent['leadPhotoId'])) {
|
||||||
$item['enclosures'][] = 'https://storage.googleapis.com/afs-prod/media/'
|
$leadPhotoUrl = sprintf('https://storage.googleapis.com/afs-prod/media/%s/800.jpeg', $storyContent['leadPhotoId']);
|
||||||
. $storyContent['leadPhotoId'] . '/800.jpeg';
|
$leadPhotoImageTag = sprintf('<img src="%s">', $leadPhotoUrl);
|
||||||
|
// Move the image to the beginning of the content
|
||||||
|
$html = $leadPhotoImageTag . $html;
|
||||||
|
// Explicitly not adding it to the item's enclosures!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user