mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-29 11:32:21 +08:00
9 lines
336 B
Text
9 lines
336 B
Text
add_filter( 'random_password', 'disable_suggested_password', 10, 2 );
|
|
|
|
function disable_suggested_password( $password ) {
|
|
$action = isset( $_GET['action'] ) ? $_GET['action'] : '';
|
|
if ( 'wp-login.php' === $GLOBALS['pagenow'] && ( 'rp' == $action || 'resetpass' == $action ) ) {
|
|
return '';
|
|
}
|
|
return $password;
|
|
}
|