Last active
June 9, 2016 15:56
-
-
Save Herm71/47f5d0f14d9ca526c95584c94b0050ec to your computer and use it in GitHub Desktop.
This file contains 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
/** | |
* 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