Last active
January 21, 2017 23:57
-
-
Save Tmeister/e91d00de202ce41090fd776490ae0d5b to your computer and use it in GitHub Desktop.
Remove version number from query string
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
<?php | |
/** | |
* Remove the ver query argument from the source path | |
* @param $src Script loader source path. | |
* | |
* @return string | |
*/ | |
function tm_remove_query_string_version( $src ){ | |
return remove_query_arg( 'ver', $src ); | |
} | |
add_filter( 'script_loader_src', 'tm_remove_query_string_version' ); | |
add_filter( 'style_loader_src', 'tm_remove_query_string_version' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment