valiermedia
4/23/2018 - 7:20 PM

v_remove_script_and_style_version.php

// Remove the version number from Javascript & CSS files
function v_remove_scripts_styles_version( $src ) {
    if ( strpos( $src, 'ver=' ) )
        $src = remove_query_arg( 'ver', $src );
    return $src;
}
// Remove the version from enqueued stylesheets (CSS)
add_filter( 'style_loader_src', 'v_remove_scripts_styles_version', 9999 );

// Remove the version from enqueued javascript files
add_filter( 'script_loader_src', 'v_remove_scripts_styles_version', 9999 );