Last active
April 20, 2016 08:18
-
-
Save crewstyle/66f617b40b8bf9db22c69a205cb5fb23 to your computer and use it in GitHub Desktop.
WordPress ~ Remove WordPress version in head HTML tag - #frontend #security #optimisation
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 WordPress version. | |
//<meta name="generator" content="WordPress __WP_VERSION__" /> | |
remove_action('wp_head', 'wp_generator'); | |
/** | |
* Remove WordPress generator info. | |
* | |
* @see https://github.com/crewstyle/clean-wordpress | |
*/ | |
add_filter('the_generator', '_cw_remove_version'); | |
function _cw_remove_version() | |
{ | |
return ''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment