Skip to content

Instantly share code, notes, and snippets.

@kagg-design
Last active June 23, 2020 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kagg-design/404b9da444f15d45a6520d8c271c96df to your computer and use it in GitHub Desktop.
Save kagg-design/404b9da444f15d45a6520d8c271c96df to your computer and use it in GitHub Desktop.
Block any kind of logins to the site
<?php
/**
* Plugin Name: Block Login
*/
function no_login_authenticate_filter( $user, $username, $pass ) {
remove_filter( 'authenticate', 'wp_authenticate_username_password', 20, 3 );
return null;
}
add_filter( 'authenticate', 'no_login_authenticate_filter', 1, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment