Skip to content

Instantly share code, notes, and snippets.

@gansbrest
Created May 25, 2015 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gansbrest/c7d59cc7e38180b2e585 to your computer and use it in GitHub Desktop.
Save gansbrest/c7d59cc7e38180b2e585 to your computer and use it in GitHub Desktop.
Drupal 6 Jquery Update
function academy_site_preprocess_page(&$vars, $hook) {
.....
if (in_array(arg(0), array('admin', 'panels', 'ctools')) || arg(1) == 'add' || arg(2) == 'edit') {
} else {
$scripts = drupal_add_js();
$new_jquery = array(drupal_get_path('theme', 'academy') . '/js/jquery-1.7.2.min.js' => $scripts['core']['misc/jquery.js']);
$scripts['core'] = array_merge($new_jquery, $scripts['core']);
unset($scripts['core']['misc/jquery.js']);
$vars['scripts'] = drupal_get_js('header', $scripts);
}
.....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment