Last active
June 23, 2020 14:32
-
-
Save kagg-design/404b9da444f15d45a6520d8c271c96df to your computer and use it in GitHub Desktop.
Block any kind of logins to the site
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
<?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