You are here

oembed.media.inc in oEmbed 8

Same filename and directory in other branches
  1. 7 oembed.media.inc
  2. 7.0 oembed.media.inc

File

oembed.media.inc
View source
<?php

/**
 *  Implements hook_media_parse().
 *
 *  @todo: this might be deprecated now that we have media_internet,
 *  but the hook is still being called in a couple places in media.
 */
function oembed_media_parse($url, $options = array()) {
  $scheme = 'oembed://';
  $matches = array();
  if ($provider = oembed_get_provider($url, $matches)) {
    return file_stream_wrapper_uri_normalize($scheme . drupal_encode_path($url));
  }

  // @TODO: Validate for malformed oembed urls.
}

/**
 * Implements hook_media_internet_providers();
 */
function oembed_media_internet_providers() {
  $info['MediaInternetOEmbedHandler'] = array(
    'title' => t('oEmbed'),
  );
  return $info;
}

Functions

Namesort descending Description
oembed_media_internet_providers Implements hook_media_internet_providers();
oembed_media_parse Implements hook_media_parse().