Skip to content

Instantly share code, notes, and snippets.

@lukecav
Last active June 8, 2016 18:15
Show Gist options
  • Save lukecav/d6ee5b74bb5138f137fec01f90e5ea57 to your computer and use it in GitHub Desktop.
Save lukecav/d6ee5b74bb5138f137fec01f90e5ea57 to your computer and use it in GitHub Desktop.
Disable Theme Editors and Plugin Editors from Dashboard
// remove editor for plugins and themes. */
define( 'DISALLOW_FILE_EDIT', true );
// remove wp version meta tag and from rss feed. */
function wprv_remove_version() {
return '';
}
add_filter('the_generator', 'wprv_remove_version');
//Remove error mesage in login. */
add_filter('login_errors',create_function('$a', "return 'Invalid Input';"));
/*Disable ping back scanner and complete xmlrpc class. */
add_filter( 'wp_xmlrpc_server_class', '__return_false' );
add_filter('xmlrpc_enabled', '__return_false');
/*Disable pingbacks */
add_filter( 'xmlrpc_methods', 'remove_xmlrpc_pingback_ping' );
function remove_xmlrpc_pingback_ping( $methods ) {
unset( $methods['pingback.ping'] );
return $methods;
} ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment