function oembedembedly_provider_callback in oEmbed 7.0
Same name and namespace in other branches
- 8 modules/oembedembedly/plugins/providers/embedly.inc \oembedembedly_provider_callback()
- 7 modules/oembedembedly/plugins/providers/embedly.inc \oembedembedly_provider_callback()
1 string reference to 'oembedembedly_provider_callback'
- embedly.inc in oembedembedly/
plugins/ providers/ embedly.inc
File
- oembedembedly/
plugins/ providers/ embedly.inc, line 47
Code
function oembedembedly_provider_callback($plugin, $url, $matches, $parameters) {
$parameters['key'] = variable_get('oembedembedly_api_key', NULL);
$function = ctools_plugin_load_function('oembed', 'providers', 'default', 'callback');
$response = call_user_func($function, $plugin, $url, $matches, $parameters);
$providers = oembedembedly_providers();
if (is_array($providers)) {
list($parent, $child) = explode(':', $plugin['name'], 2);
if (isset($providers[$child])) {
if ($providers[$child]->type == 'audio') {
$response['mime_type'] = 'audio/oembed';
}
}
}
return $response;
}