]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
OpenGraph image/thumbnail width and height
authorMikael Nordfeldth <mmn@hethane.se>
Wed, 13 Jan 2016 21:07:39 +0000 (22:07 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Wed, 13 Jan 2016 21:07:39 +0000 (22:07 +0100)
plugins/Oembed/lib/opengraphhelper.php

index 4573f5d8abcfbc4092409d89012434c2a5563beb..ccc1c2b5466c4aa9f0e69dd7d34de53272e07a79 100644 (file)
@@ -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