PHP: Trim away ?ver= from WordPress header

[php]
/* remove version from css and js for proper caching */
function _remove_script_version( $src ){
$parts = explode( ‘?’, $src );
return $parts[0];
}
add_filter( ‘script_loader_src’, ‘_remove_script_version’, 15, 1 );
[/php]

Add a Comment

Your email address will not be published. Required fields are marked *