WordPress开发者和主题制作者的搜索引擎



default_password_nag_edit_user ›

Since2.8.0
已弃用n/a
default_password_nag_edit_user ( $user_ID, $old_data )
参数: (2)
  • (int) $user_ID
    Required: Yes
  • (object) $old_data
    Required: Yes
定义在:
文档:

暂无描述



源码

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_option( $user_ID, 'default_password_nag', false, true );
	}
}