Skip to content

Instantly share code, notes, and snippets.

@tjhole
Created November 13, 2013 16:31
Show Gist options
  • Save tjhole/7451994 to your computer and use it in GitHub Desktop.
Save tjhole/7451994 to your computer and use it in GitHub Desktop.
WORDPRESS: Function - Remove version param
// remove wp version param from any enqueued scripts
function vc_remove_wp_ver_css_js( $src ) {
    if ( strpos( $src, 'ver=' ) )
        $src = remove_query_arg( 'ver', $src );
    return $src;
}
add_filter( 'style_loader_src', 'vc_remove_wp_ver_css_js', 9999 );
add_filter( 'script_loader_src', 'vc_remove_wp_ver_css_js', 9999 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment