Building a central functionality to export postings to all networks that only support plaintext postings. In near future this will replace the similar code in the several addons.

This commit is contained in:
Michael Vogel 2014-05-03 12:04:54 +02:00
commit c41b1c2d55
4 changed files with 170 additions and 3 deletions

View file

@ -51,6 +51,7 @@ function completeurl($url, $scheme) {
}
function parseurl_getsiteinfo($url, $no_guessing = false) {
$siteinfo = array();
$url = trim($url, "'");
@ -172,7 +173,7 @@ function parseurl_getsiteinfo($url, $no_guessing = false) {
$siteinfo["image"] = $attr["content"];
break;
case "twitter:card":
if ($siteinfo["type"] == "")
if (($siteinfo["type"] == "") OR ($attr["content"] == "photo"))
$siteinfo["type"] = $attr["content"];
break;
case "twitter:description":
@ -440,3 +441,4 @@ function parse_url_content(&$a) {
killme();
}
?>