Skip to content

Instantly share code, notes, and snippets.

@hrmoller
Last active August 29, 2015 14:04
Show Gist options
  • Select an option

  • Save hrmoller/fbfb350f1459ab3f671c to your computer and use it in GitHub Desktop.

Select an option

Save hrmoller/fbfb350f1459ab3f671c to your computer and use it in GitHub Desktop.
Remove Drupal hash strings on CSS/JS files
function THEME_process_html(&$vars) {
if (variable_get('environment') == 'development' && !stristr($_GET['q'],'flush-cache')) {
$vars['styles'] = preg_replace('/\.css\?.*"/','.css"', $vars['styles']);
$vars['scripts'] = preg_replace('/\.js\?.*"/','.js"', $vars['scripts']);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment