Skip to content

Commit

Permalink
Add default media value
Browse files Browse the repository at this point in the history
  • Loading branch information
aledeg committed May 4, 2023
1 parent 8eece3a commit d57c503
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Transformer/InsertTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public function transform($entry) {
$galleryDom->loadHTML(htmlspecialchars_decode(htmlentities(html_entity_decode($href))), LIBXML_NOERROR);
$galleryXpath = new \DomXpath($galleryDom);
$images = $galleryXpath->query("//meta[@name='twitter:image']");
$media = [];
foreach ($images as $image) {
$media[] = $image->getAttribute('content');
}
Expand Down

0 comments on commit d57c503

Please sign in to comment.