function oembed_filter_oembed_prepare in oEmbed 7
Same name and namespace in other branches
- 7.0 oembed.filter.inc \oembed_filter_oembed_prepare()
Implements hook_filter_FILTER_process().
1 string reference to 'oembed_filter_oembed_prepare'
- oembed_filter_info in ./
oembed.filter.inc - Implements hook_filter_info().
File
- ./
oembed.filter.inc, line 101 - Input filter that enhances oEmbed enabled URLs with extra content
Code
function oembed_filter_oembed_prepare($text, $filter, $format, $langcode, $cache, $cache_id) {
if (OEMBED_AUTOEMBED == $filter->settings['autoembed']) {
$text = preg_replace_callback(OEMBED_PATTERN_AUTOEMBED, 'oembed_preg_auto_replace', $text);
}
elseif (OEMBED_AUTOEMBED_UNWRAP == $filter->settings['autoembed']) {
$text = preg_replace_callback(unserialize(OEMBED_PATTERN_AUTOEMBED_UNWRAP), 'oembed_preg_auto_replace', $text);
}
return $text;
}