OpenGraph image/thumbnail width and height

This commit is contained in:
Mikael Nordfeldth 2016-01-13 22:07:39 +01:00
parent 1e5770bbcf
commit 24d9d76644

View File

@ -8,7 +8,7 @@ if (!defined('GNUSOCIAL')) { exit(1); }
*/ */
class OpenGraphHelper class OpenGraphHelper
{ {
const KEY_REGEX = '/^og\:(\w+)(?:\:(\w+))?/'; const KEY_REGEX = '/^og\:(\w+(?:\:\w+)?)/';
protected static $property_map = [ protected static $property_map = [
'site_name' => 'provider_name', 'site_name' => 'provider_name',
'title' => 'title', 'title' => 'title',
@ -16,6 +16,8 @@ class OpenGraphHelper
'type' => 'type', 'type' => 'type',
'url' => 'url', 'url' => 'url',
'image' => 'thumbnail_url', 'image' => 'thumbnail_url',
'image:height' => 'thumbnail_height',
'image:width' => 'thumbnail_width',
]; ];
// This regex map has: /pattern(match)/ => matchindex | string // This regex map has: /pattern(match)/ => matchindex | string