Last active
August 29, 2015 14:01
-
-
Save andrezrv/7cd4f7bbfc71f80e9f5b to your computer and use it in GitHub Desktop.
Remove query arguments from any enqueued scripts.
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
<?php | |
/** | |
* Remove query arguments from any enqueued scripts. | |
*/ | |
function remove_query_args( $src ) { | |
if ( strpos( $src, 'ver=' ) ) { | |
$src = remove_query_arg( 'ver', $src ); | |
} | |
return $src; | |
} | |
add_filter( 'style_loader_src', 'remove_query_args', 9999 ); | |
add_filter( 'script_loader_src', 'remove_query_args', 9999 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment