Instantly share code, notes, and snippets.

What would you like to do?
Gets rid of WordPress's (annoying) usage of querystrings for versioning.
add_action( 'wp_enqueue_scripts', 'piss_off_query_strings' );
function piss_off_query_strings() {
global $wp_scripts, $wp_styles;
foreach( (array) $wp_scripts->registered as $handle => $obj ) {
$wp_scripts->registered[$handle]->ver = null;
foreach( (array) $wp_styles->registered as $handle => $obj ) {
$wp_styles->registered[$handle]->ver = null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment