Strip Version From WordPress Scripts

Here is a link to the plugin that will strip “ver=” from the end of WordPress scripts. If you’re looking for a way to remove “ver=3.7.1” from the end of your WordPress scripts & stylesheets, this will do the trick.

add_filter( 'script_loader_src', 'remove_src_version' );
add_filter( 'style_loader_src', 'remove_src_version' );

function remove_src_version ( $src ) {

    global $wp_version;

    $version_str = '?ver='.$wp_version;
    $version_str_offset = strlen( $src ) - strlen( $version_str );

    if( substr( $src, $version_str_offset ) == $version_str )
        return substr( $src, 0, $version_str_offset );
    else
        return $src;

}