Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Soraph
Soraph / template.php
Last active December 22, 2015 23:59
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/
<?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;
@Soraph
Soraph / htaccess_ie-edge_chromeframe
Created September 13, 2013 13:04
.htaccess instruction to force the use of the latest IE version or ChromeFrame if is present
<IfModule mod_headers.c>
Header append X-UA-Compatible "IE=edge,chrome=1"
<FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svg|svgz|ttf|vcf|webm|webp|woff|xml|xpi)$">
Header unset X-UA-Compatible
</FilesMatch>
</IfModule>