Last active
August 29, 2015 14:04
-
-
Save hrmoller/fbfb350f1459ab3f671c to your computer and use it in GitHub Desktop.
Remove Drupal hash strings on CSS/JS files
This file contains hidden or 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
| 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