Use OEmbed data when available no matter the type
This commit is contained in:
parent
4079524f78
commit
5b5e5ef4db
|
@ -161,7 +161,6 @@ class ParseUrl
|
||||||
$siteinfo['type'] = $oembed_data->type;
|
$siteinfo['type'] = $oembed_data->type;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($oembed_data->type == 'link') && ($siteinfo['type'] != 'photo')) {
|
|
||||||
if (isset($oembed_data->title)) {
|
if (isset($oembed_data->title)) {
|
||||||
$siteinfo['title'] = trim($oembed_data->title);
|
$siteinfo['title'] = trim($oembed_data->title);
|
||||||
}
|
}
|
||||||
|
@ -173,7 +172,6 @@ class ParseUrl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Fetch the first mentioned charset. Can be in body or header
|
// Fetch the first mentioned charset. Can be in body or header
|
||||||
$charset = '';
|
$charset = '';
|
||||||
|
@ -337,7 +335,7 @@ class ParseUrl
|
||||||
$siteinfo['type'] = 'link';
|
$siteinfo['type'] = 'link';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((@$siteinfo['image'] == '') && !$no_guessing) {
|
if (empty($siteinfo['image']) && !$no_guessing) {
|
||||||
$list = $xpath->query('//img[@src]');
|
$list = $xpath->query('//img[@src]');
|
||||||
foreach ($list as $node) {
|
foreach ($list as $node) {
|
||||||
$img_tag = [];
|
$img_tag = [];
|
||||||
|
|
Loading…
Reference in a new issue