function media_youtube_emfield_providers in Media: YouTube 6
Implementation of hook_emfield_providers().
File
- ./
media_youtube.module, line 183 - Embedded Video Field provider file for YouTube.com.
Code
function media_youtube_emfield_providers($module, $provider = NULL) {
// We know this module only includes the main provider file, avoid needless
// PHP warnings.
if ($module == 'emvideo' && (!isset($provider) || $provider == 'youtube')) {
static $path;
// Cache the result for later.
if (!isset($path)) {
$found = drupal_system_listing("{$provider}\\.inc\$", drupal_get_path('module', 'media_youtube') . "/providers/{$module}", 'name', 0);
if (is_array($found) && !empty($found)) {
$path = $found;
}
}
return $path;
}
}