Adjusted field names

This commit is contained in:
Michael
2021-03-16 06:37:43 +00:00
parent 70bf75c342
commit 0a3d50a270
4 changed files with 35 additions and 29 deletions
+9 -9
View File
@@ -163,31 +163,31 @@ class OEmbed
}
}
if (!empty($data['title']) && empty($oembed->title)) {
if (!empty($data['title'])) {
$oembed->title = $data['title'];
}
if (!empty($data['text']) && empty($oembed->description)) {
if (!empty($data['text'])) {
$oembed->description = $data['text'];
}
if (!empty($data['publisher']) && empty($oembed->provider_name)) {
$oembed->provider_name = $data['publisher'];
if (!empty($data['publisher_name'])) {
$oembed->provider_name = $data['publisher_name'];
}
if (!empty($data['publisher_url']) && empty($oembed->provider_url)) {
if (!empty($data['publisher_url'])) {
$oembed->provider_url = $data['publisher_url'];
}
if (!empty($data['author']) && empty($oembed->author_name)) {
$oembed->author_name = $data['author'];
if (!empty($data['author_name'])) {
$oembed->author_name = $data['author_name'];
}
if (!empty($data['author_url']) && empty($oembed->author_url)) {
if (!empty($data['author_url'])) {
$oembed->author_url = $data['author_url'];
}
if (!empty($data['images']) && empty($oembed->thumbnail_url)) {
if (!empty($data['images'])) {
$oembed->thumbnail_url = $data['images'][0]['src'];
$oembed->thumbnail_width = $data['images'][0]['width'];
$oembed->thumbnail_height = $data['images'][0]['height'];