Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Gets rid of WordPress's (annoying) usage of querystrings for versioning.

View no_querystrings.php
1 2 3 4 5 6 7 8 9 10 11 12
<?php
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
Something went wrong with that request. Please try again.