Advertisement
niammuddin

Remove query strings from static resources

Jan 1st, 2014
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1.  
  2. function _remove_script_version( $src ){
  3. $parts = explode( '?', $src );
  4. return $parts[0];
  5. }
  6. add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
  7. add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement