- if (stripos($type, "audio/") !== false) {
- echo $br . "[audio]" . $url . "[/audio]" . $br;
- killme();
+ if (stripos($type, 'audio/') !== false) {
+ $content_type = 'audio';
+ $bbcode = $br . '[audio]' . $url . '[/audio]' . $br;
+ }
+ }
+ if (!empty($content_type)) {
+ if ($format == 'json') {
+ $ret['contentType'] = $content_type;
+ $ret['data'] = ['url' => $url];
+ $ret['success'] = true;
+ System::jsonExit($ret);