Created
October 6, 2023 21:00
-
-
Save greenhornet79/e2e2d9a63b8e14f8fde6b739edaf5eb5 to your computer and use it in GitHub Desktop.
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
<?php | |
add_filter('random_password', 'endo_disable_random_password', 10, 4); | |
function endo_disable_random_password($password, $length, $special_chars, $extra_special_chars) | |
{ | |
global $action; | |
if ('wp-login.php' === $GLOBALS['pagenow'] && in_array($action, ['rp', 'resetpass', 'login'])) { | |
$password = ''; | |
} | |
return $password; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment