mirror of
https://github.com/friendica/friendica
synced 2025-04-27 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
|
@ -92,8 +92,7 @@ function bbcode($Text,$preserve_nl = false) {
|
|||
// [img=widthxheight]image source[/img]
|
||||
$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.+?)\[\/img\]/", '<img src="$3" style="height:{$2}px; width:{$1}px;" >', $Text);
|
||||
|
||||
$a = get_app();
|
||||
if ($a->config['system']['embed_all']){
|
||||
if (get_pconfig(local_user(), 'oembed', 'use_for_youtube' )==1){
|
||||
// use oembed for youtube links
|
||||
$Text = preg_replace("/\[youtube\]/",'[embed]',$Text);
|
||||
$Text = preg_replace("/\[\/youtube\]/",'[/embed]',$Text);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue