private function FilterOEmbed::oembed_resolve_link in oEmbed 8
PREG replace callback finds [embed] shortcodes, URLs and request options.
Override in Drupal system variable `oembed_resolve_link_callback`
Parameters
string $url: URL to embed.
array $options: oEmbed request options.
Return value
string Rendered oEmbed response.
See also
MediaInternetOEmbedHandler::preSave().
1 call to FilterOEmbed::oembed_resolve_link()
- FilterOEmbed::oembed_preg_tag_replace in src/
Plugin/ Filter/ FilterOEmbed.php - PREG replace callback finds [embed] shortcodes, URLs and request options.
File
- src/
Plugin/ Filter/ FilterOEmbed.php, line 228 - Contains \Drupal\filter\Plugin\Filter\FilterOEmbed.
Class
- FilterOEmbed
- Provides a fallback placeholder filter to use for missing filters.
Namespace
Drupal\oembed\Plugin\FilterCode
private function oembed_resolve_link($url, $options = array()) {
$url = Html::decodeEntities($url);
$embed = $this->consumer
->get($url, $options);
$return = (string) $embed;
if (empty($return)) {
$return = $url;
}
return new FilterProcessResult($return);
}