function oembed_default_provider_get_child in oEmbed 7
Same name and namespace in other branches
- 8 plugins/providers/default.inc \oembed_default_provider_get_child()
- 7.0 plugins/providers/default.inc \oembed_default_provider_get_child()
Child plugins are oembed_provider objects that describe remote oEmbed endpoints.
1 string reference to 'oembed_default_provider_get_child'
- default.inc in plugins/
providers/ default.inc
File
- plugins/
providers/ default.inc, line 15
Code
function oembed_default_provider_get_child($plugin, $parent, $child) {
ctools_include('export');
$provider = ctools_export_crud_load('oembed_provider', $child);
$plugin['title'] = $provider->title;
$plugin['endpoint'] = $provider->endpoint;
$plugin['scheme'] = $provider->scheme;
$plugin['name'] = $parent . ':' . $provider->name;
// Force the plugin to be processed again because it will persist in the static cache
// of ctools_get_plugins(). Therefore, strip out the features of the child plugin
// that make it look like the parent.
unset($plugin['scheme callback']);
unset($plugin['scheme map']);
unset($plugin['weight']);
$info = ctools_plugin_get_info('oembed', 'providers');
$function = ctools_plugin_get_function($info, 'process');
$function($plugin, $info);
return $plugin;
}