mirror of
https://github.com/friendica/friendica
synced 2025-04-26 11:50:11 +00:00
Add oembed user option for use oembed instead of standard yotube embedding.
Remove global option and parse_url use of oembed.
This commit is contained in:
parent
453a0cff38
commit
7c5a7a94d4
3 changed files with 45 additions and 24 deletions
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
require_once('library/HTML5/Parser.php');
|
||||
require_once('include/oembed.php');
|
||||
|
||||
function parse_url_content(&$a) {
|
||||
|
||||
|
@ -26,15 +25,6 @@ function parse_url_content(&$a) {
|
|||
}
|
||||
|
||||
if($url) {
|
||||
// fetch link with oembed
|
||||
if ($a->config['system']['embed_all']){
|
||||
$j = oembed_fetch_url($url);
|
||||
if ($j->type!="error"){
|
||||
echo oembed_format_object($j);
|
||||
killme();
|
||||
}
|
||||
}
|
||||
|
||||
$s = fetch_url($url);
|
||||
} else {
|
||||
echo '';
|
||||
|
@ -106,4 +96,4 @@ function parse_url_content(&$a) {
|
|||
|
||||
echo sprintf($template,$url,$title,$text);
|
||||
killme();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue