Pull merge.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / library_alter.twig
1 /**
2  * Implements hook_library_alter().
3  */
4 function {{ machine_name }}_library_alter(&$libraries, $module) {
5   // Update Farbtastic to version 2.0.
6   if ($module == 'system' && isset($libraries['farbtastic'])) {
7     // Verify existing version is older than the one we are updating to.
8     if (version_compare($libraries['farbtastic']['version'], '2.0', '<')) {
9       // Update the existing Farbtastic to version 2.0.
10       $libraries['farbtastic']['version'] = '2.0';
11       $libraries['farbtastic']['js'] = array(
12         drupal_get_path('module', 'farbtastic_update') . '/farbtastic-2.0.js' => array(),
13       );
14     }
15   }
16 }