From 24d9d7664451bd59a12c1899ef03fccba5fccd04 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Wed, 13 Jan 2016 22:07:39 +0100 Subject: [PATCH] OpenGraph image/thumbnail width and height --- plugins/Oembed/lib/opengraphhelper.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/Oembed/lib/opengraphhelper.php b/plugins/Oembed/lib/opengraphhelper.php index 4573f5d8ab..ccc1c2b546 100644 --- a/plugins/Oembed/lib/opengraphhelper.php +++ b/plugins/Oembed/lib/opengraphhelper.php @@ -8,7 +8,7 @@ if (!defined('GNUSOCIAL')) { exit(1); } */ class OpenGraphHelper { - const KEY_REGEX = '/^og\:(\w+)(?:\:(\w+))?/'; + const KEY_REGEX = '/^og\:(\w+(?:\:\w+)?)/'; protected static $property_map = [ 'site_name' => 'provider_name', 'title' => 'title', @@ -16,6 +16,8 @@ class OpenGraphHelper 'type' => 'type', 'url' => 'url', 'image' => 'thumbnail_url', + 'image:height' => 'thumbnail_height', + 'image:width' => 'thumbnail_width', ]; // This regex map has: /pattern(match)/ => matchindex | string -- 2.39.5