Created
October 16, 2015 19:49
-
-
Save davekellam/931ca070e7006518bba5 to your computer and use it in GitHub Desktop.
Prevent versioning of WordPress CSS/JS
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 | |
function remove_cssjs_ver( $src ) { | |
if( strpos( $src, '?ver=' ) ) | |
$src = remove_query_arg( 'ver', $src ); | |
return $src; | |
} | |
add_filter( 'style_loader_src', 'remove_cssjs_ver', 1000 ); | |
add_filter( 'script_loader_src', 'remove_cssjs_ver', 1000 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment