provide rel=alternate link if no reshare content in post
This commit is contained in:
parent
5c379b4d35
commit
e812836a60
@ -811,6 +811,7 @@ function feed_get_reshare(&$res,$item) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$attach = $share['links'];
|
$attach = $share['links'];
|
||||||
|
|
||||||
if($attach) {
|
if($attach) {
|
||||||
foreach($attach as $att) {
|
foreach($attach as $att) {
|
||||||
if($att['rel'] === 'alternate') {
|
if($att['rel'] === 'alternate') {
|
||||||
@ -845,6 +846,10 @@ function feed_get_reshare(&$res,$item) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if((! $body) && ($share['alternate'])) {
|
||||||
|
$body = $share['alternate'];
|
||||||
|
}
|
||||||
|
|
||||||
$res['body'] = "[share author='" . urlencode($share['author']) .
|
$res['body'] = "[share author='" . urlencode($share['author']) .
|
||||||
"' profile='" . $share['profile'] .
|
"' profile='" . $share['profile'] .
|
||||||
"' avatar='" . $share['avatar'] .
|
"' avatar='" . $share['avatar'] .
|
||||||
|
Reference in New Issue
Block a user