Last active
August 29, 2015 14:13
-
-
Save tahirtaous/6d37b5f1692600024ef6 to your computer and use it in GitHub Desktop.
Security through obscurity is the name of the game here. These functions do three different things. Remove the version string from the code. No point in telling folks what version we're running. Removes any error messages (Wrong Password, No Such User, etc.) from admin login screens When the admin posts a comment, a CSS class is added. This remo…
This file contains hidden or 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
// Source http://wordpress.stackexchange.com/posts/28530/revisions | |
// Tested and worked on WordPress 4.1 Beta | |
//REMOVE VERSION STRING FROM HEADER | |
remove_action('wp_head', 'wp_generator'); | |
//HIDE LOGIN ERROR MESSAGES (Wrong Password, No Such User etc.) | |
add_filter('login_errors',create_function('$a', "return null;")); | |
// Remove admin name in comments class | |
// Source: http://www.wprecipes.com/wordpress-hack-remove-admin-name-in-comments-class | |
function remove_comment_author_class( $classes ) { | |
foreach( $classes as $key => $class ) { | |
if(strstr($class, "comment-author-")) { | |
unset( $classes[$key] ); | |
} | |
} | |
return $classes; | |
} | |
add_filter( 'comment_class' , 'remove_comment_author_class' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment