mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-02-16 07:09:54 +03:00
[AssociatedPressNews] fix: prepend lead photo to items (#2905)
This commit is contained in:
parent
f672902896
commit
c992bcc8bf
1 changed files with 5 additions and 2 deletions
|
@ -149,8 +149,11 @@ class AssociatedPressNewsBridge extends BridgeAbstract
|
|||
$this->processIframes($html);
|
||||
|
||||
if (!is_null($storyContent['leadPhotoId'])) {
|
||||
$item['enclosures'][] = 'https://storage.googleapis.com/afs-prod/media/'
|
||||
. $storyContent['leadPhotoId'] . '/800.jpeg';
|
||||
$leadPhotoUrl = sprintf('https://storage.googleapis.com/afs-prod/media/%s/800.jpeg', $storyContent['leadPhotoId']);
|
||||
$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…
Add table
Reference in a new issue