Skip to content

Instantly share code, notes, and snippets.

@Herm71
Last active June 9, 2016 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Herm71/47f5d0f14d9ca526c95584c94b0050ec to your computer and use it in GitHub Desktop.
Save Herm71/47f5d0f14d9ca526c95584c94b0050ec to your computer and use it in GitHub Desktop.
/**
* Remove Query String from Static Resources
* @author Blackbird Consulting/Jason Chafin
* @link https://gist.github.com/Herm71/47f5d0f14d9ca526c95584c94b0050ec
*
* @param $src
* @return modified query string
*/
function _bb_remove_query_string($src){
$parts=explode('?',$src);
return $parts[0];
}
add_filter( 'script_loader_src', '_bb_remove_query_string', 15, 1 );
add_filter( 'style_loader_src', '_bb_remove_query_string', 15, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment