function oembed_fetch_url($embedurl, $no_rich_type = false){
-
$embedurl = trim($embedurl, "'");
$embedurl = trim($embedurl, '"');
if (!is_object($j))
return false;
+ // Always embed the SSL version
+ if (isset($j->html))
+ $j->html = str_replace(array("http://www.youtube.com/", "http://player.vimeo.com/"),
+ array("https://www.youtube.com/", "https://player.vimeo.com/"), $j->html);
+
$j->embedurl = $embedurl;
// If fetching information doesn't work, then improve via internal functions
}
}
+ call_hooks('oembed_fetch_url', $embedurl, $j);
+
return $j;
}
// add link to source if not present in "rich" type
if ($j->type!='rich' || !strpos($j->html,$embedurl) ){
+ $ret .= "<h4>";
if (isset($j->title)) {
if (isset($j->provider_name))
$ret .= $j->provider_name.": ";
}
//if (isset($j->author_name)) $ret.=" by ".$j->author_name;
//if (isset($j->provider_name)) $ret.=" on ".$j->provider_name;
+ $ret .= "</h4>";
} else {
// add <a> for html2bbcode conversion
$ret .= "<a href='$embedurl' rel='oembed'>$embedurl</a>";
+ $ret.="<br style='clear:left'></span>";
}
- $ret.="<br style='clear:left'></span>";
return mb_convert_encoding($ret, 'HTML-ENTITIES', mb_detect_encoding($ret));
}