function youtube_colorbox_form_youtube_settings_form_alter in YouTube Field 7
Implements hook_form_FORM_ID_alter().
File
- modules/
youtube_colorbox/ youtube_colorbox.module, line 35 - Provides Colorbox support to YouTube Field display settings.
Code
function youtube_colorbox_form_youtube_settings_form_alter(&$form, &$form_state) {
// Provide warning about the need to set 'Enable Colorbox load' to TRUE in the
// Colorbox module settings. Otherwise links provided by YouTube Colorbox will
// not work as expected. This warning appears in the YouTube module settings.
if (!variable_get('colorbox_load', FALSE)) {
$args = array(
'!colorbox_settings' => l(t('Colorbox module settings'), 'admin/config/media/colorbox'),
);
$message = t("Please enable 'Enable Colorbox load' in the !colorbox_settings for thumbnails linked by YouTube Field Colorbox to work as expected.", $args);
drupal_set_message($message, 'warning');
}
}