diff --git a/src/Content/PageInfo.php b/src/Content/PageInfo.php index e4d9207c8c..d301c4d04d 100644 --- a/src/Content/PageInfo.php +++ b/src/Content/PageInfo.php @@ -134,14 +134,6 @@ class PageInfo $text = "[attachment type='" . $data['type'] . "'"; - if (empty($data['text'])) { - $data['text'] = $data['title']; - } - - if (empty($data['text'])) { - $data['text'] = $data['url']; - } - if (!empty($data['url'])) { $text .= " url='" . $data['url'] . "'"; } @@ -160,6 +152,14 @@ class PageInfo $text .= " image='" . $preview . "'"; } else { $text .= " preview='" . $preview . "'"; + + if (empty($data['text'])) { + $data['text'] = $data['title']; + } + + if (empty($data['text'])) { + $data['text'] = $data['url']; + } } }