]> git.mxchange.org Git - friendica.git/commitdiff
Make guid attribute available to convertShare callback
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 21 Jun 2020 13:45:00 +0000 (09:45 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 21 Jun 2020 13:45:00 +0000 (09:45 -0400)
src/Content/Text/BBCode.php

index 266182b3b8672e9e32590b16d561b637447d8c48..7354e064512a855d832370804f996b5205734fda 100644 (file)
@@ -978,7 +978,7 @@ class BBCode
                        function ($match) use ($callback) {
                                $attribute_string = $match[2];
                                $attributes = [];
-                               foreach (['author', 'profile', 'avatar', 'link', 'posted'] as $field) {
+                               foreach (['author', 'profile', 'avatar', 'link', 'posted', 'guid'] as $field) {
                                        preg_match("/$field=(['\"])(.+?)\\1/ism", $attribute_string, $matches);
                                        $attributes[$field] = html_entity_decode($matches[2] ?? '', ENT_QUOTES, 'UTF-8');
                                }
@@ -1088,6 +1088,7 @@ class BBCode
                                        '$link'         => $attributes['link'],
                                        '$link_title'   => DI::l10n()->t('link to source'),
                                        '$posted'       => $attributes['posted'],
+                                       '$guid'         => $attributes['guid'],
                                        '$network_name' => ContactSelector::networkToName($contact['network'], $attributes['profile']),
                                        '$network_icon' => ContactSelector::networkToIcon($contact['network'], $attributes['profile']),
                                        '$content'      => self::setMentions(trim($content), 0, $contact['network']),