函数原型
default_password_nag_edit_user( int $user_ID, WP_User $old_data )
函数描述
是否弃用
未弃用
函数参数
-
$user_ID
int
Required -
$old_data
WP_User
Required
函数返回值
无
函数位置
File: wp-admin/includes/user.php.
函数源码
function default_password_nag_edit_user( $user_ID, $old_data ) {
// Short-circuit it.
if ( ! get_user_option( 'default_password_nag', $user_ID ) ) {
return;
}
$new_data = get_userdata( $user_ID );
// Remove the nag if the password has been changed.
if ( $new_data->user_pass != $old_data->user_pass ) {
delete_user_setting( 'default_password_nag' );
update_user_meta( $user_ID, 'default_password_nag', false );
}
}
源码链接
变更日志
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |

