function video_embed_field_update_7007 in Video Embed Field 7.2
Update youtube "hd" URL deprecated parameter.
File
- ./
video_embed_field.install, line 298 - Install, update and uninstall functions for the video_embed_field module.
Code
function video_embed_field_update_7007() {
drupal_get_schema('vef_video_styles', TRUE);
ctools_include('export');
$styles = ctools_export_load_object('vef_video_styles');
foreach ($styles as $style) {
if (isset($style->data['youtube']['hd'])) {
if ($style->data['youtube']['hd']) {
$style->data['youtube']['vq'] = 'hd720';
}
else {
$style->data['youtube']['vq'] = 'large';
}
unset($style->data['youtube']['hd']);
ctools_export_crud_save('vef_video_styles', $style);
}
}
return t('Parameter hd has been converted to vq.');
}