Last active
September 14, 2015 05:47
-
-
Save QROkes/30e56efac23340edda5e to your computer and use it in GitHub Desktop.
Remove WordPress generator meta tag
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
// Remove WordPress Generator Meta Tag | |
function remove_generator_filter() { return ''; } | |
if (function_exists('add_filter')) { | |
$types = array('html', 'xhtml', 'atom', 'rss2', 'rdf', 'comment', 'export'); | |
foreach ($types as $type) | |
add_filter('get_the_generator_'.$type, 'remove_generator_filter'); | |
} | |
// Another option: | |
function qr_remove_wp_version() {return '';} | |
add_filter('the_generator', 'qr_remove_wp_version'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment