Fix Opengraph images inside zmg opening tag

This commit is contained in:
Max Kostikov
2022-06-14 23:19:09 +02:00
parent f0e4b4dc84
commit 5e2bb874c8

View File

@@ -21,7 +21,7 @@
$ogtitle = $item['title']; $ogtitle = $item['title'];
// find first image if exist // find first image if exist
if(preg_match("/\[[zi]mg(=[0-9]+x[0-9]+)?\]([^\[]+)/is", $item['body'], $matches)) { if (preg_match("/\[[zi]mg(=[0-9]+x[0-9]+)?\]([^\[]+)/is", $item['body'], $matches) || preg_match("/\[[zi]mg(=)([^\]]+)/is", $item['body'], $matches)) {
$ogimage = $matches[2]; $ogimage = $matches[2];
$ogimagetype = guess_image_type($ogimage); $ogimagetype = guess_image_type($ogimage);
} }