function _emfield_field_validate_id in Embedded Media Field 5
Same name and namespace in other branches
- 6.3 deprecated/emfield-deprecated.inc \_emfield_field_validate_id()
- 6 emfield.module \_emfield_field_validate_id()
- 6.2 emfield.module \_emfield_field_validate_id()
extract the id from embedded code or url
1 call to _emfield_field_validate_id()
- emfield_emfield_field in ./
emfield.module - Implementation of hook_emfield_field *
File
- ./
emfield.module, line 295
Code
function _emfield_field_validate_id($field, $item, $error_field, $module, $delta = 0) {
// load the provider info
$item = _emfield_field_submit_id($field, $item, $module, $error_field);
// ensure we have proper provider info
if ($item['embed'] && !$item['value']) {
form_set_error($error_field, t('You have specified an invalid media URL or embed code.'));
}
return $item;
}