fix(user): move avatar upload to hover overlay

This commit is contained in:
kate522 committed 2026-07-29 14:17:52 +08:00
1 parent 224691e709
commit eed75d9f15
4 files changed
+79 -56

No files matched your search

+1 -6
View File
@@ -380,20 +380,15 @@ if (!function_exists('aksrt_user_center_avatar_upload_config')) {
'restUrl' => rest_url('aksrt/v1/user/avatar'),
'restNonce' => wp_create_nonce('wp_rest'),
'buttonId' => 'aksrt-upload-avatar-btn',
'removeButtonId' => 'aksrt-remove-avatar-btn',
'inputId' => 'aksrt-avatar-file-input',
'imageId' => 'aksrt-user-avatar-image',
'fieldName' => 'avatar',
'maxSize' => $max_size,
'idleText' => __('更换头像', 'aksrt'),
'loadingText' => __('上传中…', 'aksrt'),
'removeText' => __('恢复默认头像', 'aksrt'),
'removingText' => __('恢复中…', 'aksrt'),
'confirmRemoveText' => __('确定恢复为默认头像?当前上传的头像文件将被删除。', 'aksrt'),
'tooLargeText' => sprintf(__('图片大小不能超过 %dMB', 'aksrt'), (int) ($max_size / MB_IN_BYTES)),
'successText' => __('头像已更新', 'aksrt'),
'removeSuccessText' => __('已恢复默认头像', 'aksrt'),
'errorText' => __('头像操作失败', 'aksrt'),
'errorText' => __('头像上传失败', 'aksrt'),
];
}
}