function oembed_render_element in oEmbed 7
Same name and namespace in other branches
- 8 oembed.module \oembed_render_element()
- 7.0 oembed.module \oembed_render_element()
Prepare an element based on a oEmbed request.
Parameters
$type: Element type.
$url: URL to embed.
$parameters: oEmbed request parameters.
Return value
array A renderable array with the following keys and values:
- #type: The passed-in element $type.
- #url: The passed-in $url.
- #parameters: The passed-in $parameters.
5 calls to oembed_render_element()
- OembedTestCase::testOembedRenderElements in ./
oembed.test - Tests the oembed render element types.
- oembed_field_formatter_view in ./
oembed.field.inc - Implements hook_field_formatter_view().
- oembed_file_formatter_view in ./
oembed.module - Implements hook_file_formatter_FORMATTER_view().
- oembed_resolve_link in ./
oembed.filter.inc - PREG replace callback finds [embed] shortcodes, URLs and request options.
- oembed_test_validate in ./
oembed.admin.inc - Validate input by attemping to request URL and generate display.
File
- ./
oembed.module, line 495 - Core functionality for oEmbed
Code
function oembed_render_element($type, $url, $parameters = array()) {
return array(
'#type' => $type,
'#url' => $url,
'#parameters' => $parameters,
);
}