Only display redundant preview data with preview picture

Cette révision appartient à :
Michael 2020-09-19 19:02:40 +00:00
Parent 6e8f27b421
révision 1a0db28d2e
1 fichiers modifiés avec 8 ajouts et 8 suppressions

Voir le fichier

@ -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'];
}
}
}