Last active
December 22, 2015 23:59
-
-
Save Soraph/6550588 to your computer and use it in GitHub Desktop.
Drupal 7 theme function to update the jQuery version used by the website, strongly recommended to restrict this to specific URLs, it will create issues in the default administration theme. More info: http://oldwildissue.wordpress.com/2012/11/19/drupal-7-manually-update-jquery-version/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function yourtheme_js_alter(&$javascript) { | |
[...]your stuffs[...] | |
$jquery_new = drupal_get_path('theme','yourtheme') . '/js/jquery-1.10.2.min.js'; | |
$javascript[$jquery_new] = $javascript['misc/jquery.js']; | |
$javascript[$jquery_new]['version'] = '1.10.2'; | |
$javascript[$jquery_new]['data'] = $jquery_new; | |
unset($javascript['misc/jquery.js']); | |
[...]your other stuffs[...] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment