Last active
March 19, 2016 09:45
-
-
Save newmediologo/3852359cdb79a6862787 to your computer and use it in GitHub Desktop.
Nascondere la versione di WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Remove WP version | |
function my_remove_version_info() { | |
return ''; | |
} | |
add_filter('the_generator', 'my_remove_version_info'); | |
// Remove css and script version | |
function remove_css_js_ver( $src ) { | |
if( strpos( $src, '?ver=' ) ) | |
$src = remove_query_arg( 'ver', $src ); | |
return $src; | |
} | |
add_filter( 'style_loader_src', 'remove_css_js_ver', 9999 ); | |
add_filter( 'script_loader_src', 'remove_css_js_ver', 9999 ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment