Browse Source

Merge pull request #9243 from annando/preview-text

Only display redundant preview data with preview picture
tags/2020.09
Hypolite Petovan 1 month ago
committed by GitHub
parent
commit
b9a61e5bfb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions
  1. +8
    -8
      src/Content/PageInfo.php

+ 8
- 8
src/Content/PageInfo.php View File

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



Loading…
Cancel
Save