function media_update_media_update_params in Media Update 7.2
Same name and namespace in other branches
- 7 media_update.module \media_update_media_update_params()
Implements hook_media_update_params().
Base implementation of hook_media_update_params to return values for media_internet module and allow for updates of existing media.
File
- ./
media_update.module, line 19 - Defines the module media_update.
Code
function media_update_media_update_params($schema) {
// Handle standard media_internet functionality
if (function_exists('media_internet_get_providers')) {
$internet_provider = media_internet_get_providers();
foreach ($internet_provider as $provider) {
// TODO: Seriously, can this be the only way? Seems SO fragile.
if ($provider['title'] == $schema) {
return array(
'form' => 'media_internet_add',
'field' => 'embed_code',
'type' => 'field',
);
}
}
}
// Default to standard file upload.
return array();
}