// Remove WordPress version from the generator meta tag in the header
remove_action('wp_head', 'wp_generator');
// Remove WordPress version from RSS feeds
add_filter('the_generator', '__return_empty_string');
// Remove version query strings from scripts and styles
function wpsnippetpress_remove_version_query_strings($src) {
if (strpos($src, '?ver=') !== false) {
$src = remove_query_arg('ver', $src);
}
return $src;
}
add_filter('script_loader_src', 'wpsnippetpress_remove_version_query_strings');
add_filter('style_loader_src', 'wpsnippetpress_remove_version_query_strings');PHP