Kriuchko
1/8/2019 - 2:29 PM

Remove wp version

Wordpress remove wp version

function remove_cssjs_ver($src){
 if(strpos($src, '?ver='))
  $src = remove_query_arg('ver', $src);
 return $src;
}
add_filter('script_loader_src', 'remove_cssjs_ver', 10, 2);
add_filter('style_loader_src', 'remove_cssjs_ver', 10, 2);

function _remove_script_version($src){
 $parts = explode('?', $src);
 return $parts[0];
}
add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );