function oembed_get_data in oEmbed 7
Same name and namespace in other branches
- 8 oembed.module \oembed_get_data()
- 7.0 oembed.module \oembed_get_data()
Fetch data for an embeddable URL.
Parameters
string $url: An external URL for the content to embed.
array $parameters: An associative array of request parameters, with the following keys:
- 'maxwidth' The maximum width of the embed, in pixels.
- 'maxheight' The maximum height of the embed, in pixels.
Other keys may be supported by some providers (twitter, youtube, wordpress).
Return value
bool|array False or an array representing the embeddable data of the URL.
9 calls to oembed_get_data()
- MediaInternetOEmbedHandler::getOEmbed in ./
MediaInternetOEmbedHandler.inc - Returns an array representation of the oEmbed data, or NULL on failure.
- OEmbedStreamWrapper::getMimeType in ./
OEmbedStreamWrapper.inc - Base implementation of getMimeType().
- OembedTestCase::testOembedProviderUrls in ./
oembed.test - Tests that actual response type matches the expected response type.
- oembed_field_attach_validate in ./
oembed.filter.inc - Implements hook_field_attach_validate().
- oembed_file_load in ./
oembed.file.inc - Implements hook_file_load().
File
- ./
oembed.module, line 242 - Core functionality for oEmbed
Code
function oembed_get_data($url, $parameters = array()) {
$matches = array();
$parameters = array_filter($parameters);
if ($plugin = oembed_get_provider($url, $matches)) {
return oembed_oembed_fetch($plugin, $url, $matches, $parameters);
}
return FALSE;
}