You are here

function oembedembedly_provider_callback in oEmbed 8

Same name and namespace in other branches
  1. 7 modules/oembedembedly/plugins/providers/embedly.inc \oembedembedly_provider_callback()
  2. 7.0 oembedembedly/plugins/providers/embedly.inc \oembedembedly_provider_callback()
1 string reference to 'oembedembedly_provider_callback'
embedly.inc in modules/oembedembedly/plugins/providers/embedly.inc

File

modules/oembedembedly/plugins/providers/embedly.inc, line 47

Code

function oembedembedly_provider_callback($plugin, $url, $matches, $parameters) {
  $parameters['key'] = variable_get('oembedembedly_api_key', NULL);

  // This guarantees that the plugin's file is loaded.
  $function = ctools_plugin_load_function('oembed', 'providers', 'default', 'callback');
  $response = oembed_default_callback($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;
}