update linkinfo from dev
This commit is contained in:
parent
4830a1559d
commit
b4b3e7b9a4
@ -270,20 +270,43 @@ class Linkinfo extends \Zotlabs\Web\Controller {
|
|||||||
$attr["content"] = html_entity_decode($attr["content"], ENT_QUOTES, "UTF-8");
|
$attr["content"] = html_entity_decode($attr["content"], ENT_QUOTES, "UTF-8");
|
||||||
|
|
||||||
switch (strtolower($attr["name"])) {
|
switch (strtolower($attr["name"])) {
|
||||||
case 'generator':
|
|
||||||
$siteinfo['generator'] = $attr['content'];
|
|
||||||
break;
|
|
||||||
case "fulltitle":
|
case "fulltitle":
|
||||||
$siteinfo["title"] = $attr["content"];
|
$siteinfo["title"] = trim($attr["content"]);
|
||||||
break;
|
break;
|
||||||
case "description":
|
case "description":
|
||||||
$siteinfo["text"] = $attr["content"];
|
$siteinfo["text"] = trim($attr["content"]);
|
||||||
|
break;
|
||||||
|
case "thumbnail":
|
||||||
|
$siteinfo["image"] = $attr["content"];
|
||||||
|
break;
|
||||||
|
case "twitter:image":
|
||||||
|
$siteinfo["image"] = $attr["content"];
|
||||||
|
break;
|
||||||
|
case "twitter:image:src":
|
||||||
|
$siteinfo["image"] = $attr["content"];
|
||||||
|
break;
|
||||||
|
case "twitter:card":
|
||||||
|
if (($siteinfo["type"] == "") || ($attr["content"] == "photo")) {
|
||||||
|
$siteinfo["type"] = $attr["content"];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "twitter:description":
|
||||||
|
$siteinfo["text"] = trim($attr["content"]);
|
||||||
|
break;
|
||||||
|
case "twitter:title":
|
||||||
|
$siteinfo["title"] = trim($attr["content"]);
|
||||||
break;
|
break;
|
||||||
case "dc.title":
|
case "dc.title":
|
||||||
$siteinfo["title"] = $attr["content"];
|
$siteinfo["title"] = trim($attr["content"]);
|
||||||
break;
|
break;
|
||||||
case "dc.description":
|
case "dc.description":
|
||||||
$siteinfo["text"] = $attr["content"];
|
$siteinfo["text"] = trim($attr["content"]);
|
||||||
|
break;
|
||||||
|
case "keywords":
|
||||||
|
$keywords = explode(",", $attr["content"]);
|
||||||
|
break;
|
||||||
|
case "news_keywords":
|
||||||
|
$keywords = explode(",", $attr["content"]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user