Created
February 6, 2017 13:12
-
-
Save mklasen/20c22ba2bf036695141a1ef5721d3dc6 to your computer and use it in GitHub Desktop.
Remove version numbers from enqueues
This file contains hidden or 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
// Used mainly for live reload with Chrome workspaces | |
add_filter( 'style_loader_src', 'mk_remove_version_numbers', 9999 ); | |
add_filter( 'script_loader_src', 'mk_remove_version_numbers', 9999 ); | |
function mk_remove_version_numbers( $src ) { | |
if ( strpos( $src, 'ver=' ) ) | |
$src = remove_query_arg( 'ver', $src ); | |
return $src; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment