Skip to content

Instantly share code, notes, and snippets.

@greenhornet79
Created October 6, 2023 21:00
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 greenhornet79/e2e2d9a63b8e14f8fde6b739edaf5eb5 to your computer and use it in GitHub Desktop.
Save greenhornet79/e2e2d9a63b8e14f8fde6b739edaf5eb5 to your computer and use it in GitHub Desktop.
<?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