Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove version number from query string
<?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