remove_action('wp_head', 'wlwmanifest_link');
Security
Hide Login errors
add_filter(
'login_errors',
function ( $error ) {
// Edit the line below to customize the message.
return 'Something is wrong!';
}
);
Disable Plugin & Theme file editor
// Disable the Plugin and Theme Editor
if ( ! defined( 'DISALLOW_FILE_EDIT' ) ) {
define( 'DISALLOW_FILE_EDIT', true );
}
Disable WordPress REST API
add_filter(
'rest_authentication_errors',
function ( $access ) {
return new WP_Error(
'rest_disabled',
__( 'The WordPress REST API has been disabled.' ),
array(
'status' => rest_authorization_required_code(),
)
);
}
);
Disable XML-RPC
add_filter( 'xmlrpc_enabled', '__return_false' );
Remove WordPress version number
add_filter('the_generator', '__return_empty_string');